MemoryCacheServiceCollectionExtensions extension

Extension methods for registering caching services on a ServiceCollection.

on

Methods

addDistributedMemoryCache({void configureOptions(MemoryDistributedCacheOptions options)?}) ServiceCollection

Available on ServiceCollection, provided by the MemoryCacheServiceCollectionExtensions extension

Adds a default in-memory implementation of DistributedCache to the service collection as a singleton.
addMemoryCache({void configureOptions(MemoryCacheOptions options)?}) ServiceCollection

Available on ServiceCollection, provided by the MemoryCacheServiceCollectionExtensions extension

Adds a non-distributed in-memory MemoryCache to the service collection as a singleton.