<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="11.0.0-preview.3.26207.106" />

Microsoft.Extensions.DependencyInjection.MemoryCacheServiceCollectionExtensions

public static IServiceCollection AddDistributedMemoryCache(this IServiceCollection services)

public static IServiceCollection AddDistributedMemoryCache(this IServiceCollection services, Action<MemoryDistributedCacheOptions> setupAction)

public static IServiceCollection AddMemoryCache(this IServiceCollection services)

public static IServiceCollection AddMemoryCache(this IServiceCollection services, Action<MemoryCacheOptions> setupAction)