MemoryCacheServiceCollectionExtensions.AddMemoryCache Metode
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
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)
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>)
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.