Deli z drugimi prek


MemoryCacheServiceCollectionExtensions Class

Definition

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, 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.

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.

AddMemoryCache(IServiceCollection, Action<MemoryCacheOptions>)

Adds a non distributed in-memory implementation of IMemoryCache to the IServiceCollection.

AddMemoryCache(IServiceCollection)

Adds a non distributed in-memory implementation of IMemoryCache to the IServiceCollection.

Applies to