MemoryCacheServiceCollectionExtensions Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Extension methods for setting up memory cache related services in an IServiceCollection.
public ref class MemoryCacheServiceCollectionExtensions abstract sealed
public static class MemoryCacheServiceCollectionExtensions
type MemoryCacheServiceCollectionExtensions = class
Public Module MemoryCacheServiceCollectionExtensions
- Inheritance
-
MemoryCacheServiceCollectionExtensions
Methods
AddDistributedMemoryCache(IServiceCollection) |
Adds a default implementation of IDistributedCache that stores items in memory to the IServiceCollection. Frameworks that require a distributed cache to work can safely add this dependency as part of their dependency list to ensure that there is at least one implementation available. |
AddDistributedMemoryCache(IServiceCollection, Action<MemoryDistributedCacheOptions>) |
Adds a default implementation of IDistributedCache that stores items in memory to the IServiceCollection. Frameworks that require a distributed cache to work can safely add this dependency as part of their dependency list to ensure that there is at least one implementation available. |
AddMemoryCache(IServiceCollection) |
Adds a non distributed in-memory implementation of IMemoryCache to the IServiceCollection. |
AddMemoryCache(IServiceCollection, Action<MemoryCacheOptions>) |
Adds a non distributed in-memory implementation of IMemoryCache to the IServiceCollection. |