MemoryCacheServiceCollectionExtensions.AddMemoryCache 메서드

정의

오버로드

AddMemoryCache(IServiceCollection)

IMemoryCache의 분산되지 않은 메모리 내 구현을 IServiceCollection에 추가합니다.Adds a non distributed in memory implementation of IMemoryCache to the IServiceCollection.

AddMemoryCache(IServiceCollection, Action<MemoryCacheOptions>)

IMemoryCache의 분산되지 않은 메모리 내 구현을 IServiceCollection에 추가합니다.Adds a non distributed in memory implementation of IMemoryCache to the IServiceCollection.

AddMemoryCache(IServiceCollection)

IMemoryCache의 분산되지 않은 메모리 내 구현을 IServiceCollection에 추가합니다.Adds a non distributed in memory implementation of IMemoryCache to the IServiceCollection.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddMemoryCache(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddMemoryCache (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddMemoryCache : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddMemoryCache (services As IServiceCollection) As IServiceCollection

매개 변수

services
IServiceCollection

서비스를 추가할 IServiceCollection입니다.The IServiceCollection to add services to.

반환

추가 호출을 연결할 수 있도록 하는 IServiceCollection입니다.The IServiceCollection so that additional calls can be chained.

AddMemoryCache(IServiceCollection, Action<MemoryCacheOptions>)

IMemoryCache의 분산되지 않은 메모리 내 구현을 IServiceCollection에 추가합니다.Adds a non distributed in memory implementation of IMemoryCache to the IServiceCollection.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddMemoryCache(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Action<Microsoft::Extensions::Caching::Memory::MemoryCacheOptions ^> ^ setupAction);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddMemoryCache (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.Extensions.Caching.Memory.MemoryCacheOptions> setupAction);
static member AddMemoryCache : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.Extensions.Caching.Memory.MemoryCacheOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddMemoryCache (services As IServiceCollection, setupAction As Action(Of MemoryCacheOptions)) As IServiceCollection

매개 변수

services
IServiceCollection

서비스를 추가할 IServiceCollection입니다.The IServiceCollection to add services to.

setupAction
Action<MemoryCacheOptions>

제공된 Action<T>를 구성하는 MemoryCacheOptions입니다.The Action<T> to configure the provided MemoryCacheOptions.

반환

추가 호출을 연결할 수 있도록 하는 IServiceCollection입니다.The IServiceCollection so that additional calls can be chained.

적용 대상