Partager via


MemoryCacheServiceCollectionExtensions.AddMemoryCache Méthode

Définition

Surcharges

AddMemoryCache(IServiceCollection)

Ajoute une implémentation de mémoire non distribuée de IMemoryCache au IServiceCollection.

AddMemoryCache(IServiceCollection, Action<MemoryCacheOptions>)

Ajoute une implémentation de mémoire non distribuée de IMemoryCache au IServiceCollection.

AddMemoryCache(IServiceCollection)

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

Ajoute une implémentation de mémoire non distribuée de IMemoryCache au 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

Paramètres

services
IServiceCollection

IServiceCollection auquel ajouter les services.

Retours

IServiceCollection à utiliser pour chaîner des appels supplémentaires.

S’applique à

AddMemoryCache(IServiceCollection, Action<MemoryCacheOptions>)

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

Ajoute une implémentation de mémoire non distribuée de IMemoryCache au 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

Paramètres

services
IServiceCollection

IServiceCollection auquel ajouter les services.

setupAction
Action<MemoryCacheOptions>

Action<T> pour configurer le MemoryCacheOptions fourni.

Retours

IServiceCollection à utiliser pour chaîner des appels supplémentaires.

S’applique à