Compartir a través de


MemoryCacheServiceCollectionExtensions.AddMemoryCache Método

Definición

Sobrecargas

AddMemoryCache(IServiceCollection)

Agrega una implementación de memoria no distribuida de IMemoryCache a IServiceCollection.

AddMemoryCache(IServiceCollection, Action<MemoryCacheOptions>)

Agrega una implementación de memoria no distribuida de IMemoryCache a IServiceCollection.

AddMemoryCache(IServiceCollection)

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

Agrega una implementación de memoria no distribuida de IMemoryCache a 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

Parámetros

services
IServiceCollection

La interfaz IServiceCollection a la que se van a agregar los servicios.

Devoluciones

La interfaz IServiceCollection para que se puedan encadenar llamadas adicionales.

Se aplica a

AddMemoryCache(IServiceCollection, Action<MemoryCacheOptions>)

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

Agrega una implementación de memoria no distribuida de IMemoryCache a 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

Parámetros

services
IServiceCollection

La interfaz IServiceCollection a la que se van a agregar los servicios.

setupAction
Action<MemoryCacheOptions>

El objeto Action<T> para configurar el objeto MemoryCacheOptions proporcionado.

Devoluciones

La interfaz IServiceCollection para que se puedan encadenar llamadas adicionales.

Se aplica a