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. |
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om