Bagikan melalui


MemoryCacheServiceCollectionExtensions.AddMemoryCache Metode

Definisi

Overload

AddMemoryCache(IServiceCollection)

Menambahkan non terdistribusi dalam implementasi IMemoryCache memori ke IServiceCollection.

AddMemoryCache(IServiceCollection, Action<MemoryCacheOptions>)

Menambahkan non terdistribusi dalam implementasi IMemoryCache memori ke IServiceCollection.

AddMemoryCache(IServiceCollection)

Sumber:
MemoryCacheServiceCollectionExtensions.cs
Sumber:
MemoryCacheServiceCollectionExtensions.cs
Sumber:
MemoryCacheServiceCollectionExtensions.cs
Sumber:
MemoryCacheServiceCollectionExtensions.cs

Menambahkan non terdistribusi dalam implementasi IMemoryCache memori ke 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

Parameter

services
IServiceCollection

untuk IServiceCollection menambahkan layanan.

Mengembalikan

IServiceCollection Sehingga panggilan tambahan dapat dirangkai.

Berlaku untuk

AddMemoryCache(IServiceCollection, Action<MemoryCacheOptions>)

Sumber:
MemoryCacheServiceCollectionExtensions.cs
Sumber:
MemoryCacheServiceCollectionExtensions.cs
Sumber:
MemoryCacheServiceCollectionExtensions.cs
Sumber:
MemoryCacheServiceCollectionExtensions.cs

Menambahkan non terdistribusi dalam implementasi IMemoryCache memori ke 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

Parameter

services
IServiceCollection

untuk IServiceCollection menambahkan layanan.

setupAction
Action<MemoryCacheOptions>

Action<T> untuk mengonfigurasi yang disediakan MemoryCacheOptions.

Mengembalikan

IServiceCollection Sehingga panggilan tambahan dapat dirangkai.

Berlaku untuk