다음을 통해 공유


MemoryCacheServiceCollectionExtensions.AddMemoryCache 메서드

정의

오버로드

AddMemoryCache(IServiceCollection)

IMemoryCache의 분산되지 않은 메모리 내 구현을 IServiceCollection에 추가합니다.

AddMemoryCache(IServiceCollection, Action<MemoryCacheOptions>)

IMemoryCache의 분산되지 않은 메모리 내 구현을 IServiceCollection에 추가합니다.

AddMemoryCache(IServiceCollection)

Source:
MemoryCacheServiceCollectionExtensions.cs
Source:
MemoryCacheServiceCollectionExtensions.cs
Source:
MemoryCacheServiceCollectionExtensions.cs
Source:
MemoryCacheServiceCollectionExtensions.cs

IMemoryCache의 분산되지 않은 메모리 내 구현을 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입니다.

반환

추가 호출을 연결할 수 있도록 하는 IServiceCollection입니다.

적용 대상

AddMemoryCache(IServiceCollection, Action<MemoryCacheOptions>)

Source:
MemoryCacheServiceCollectionExtensions.cs
Source:
MemoryCacheServiceCollectionExtensions.cs
Source:
MemoryCacheServiceCollectionExtensions.cs
Source:
MemoryCacheServiceCollectionExtensions.cs

IMemoryCache의 분산되지 않은 메모리 내 구현을 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입니다.

setupAction
Action<MemoryCacheOptions>

제공된 MemoryCacheOptions를 구성하는 Action<T>입니다.

반환

추가 호출을 연결할 수 있도록 하는 IServiceCollection입니다.

적용 대상