MemoryDistributedCache Classe

Definizione

Implementa l'uso di IDistributedCacheIMemoryCache.

public ref class MemoryDistributedCache : Microsoft::Extensions::Caching::Distributed::IDistributedCache
public class MemoryDistributedCache : Microsoft.Extensions.Caching.Distributed.IDistributedCache
type MemoryDistributedCache = class
    interface IDistributedCache
Public Class MemoryDistributedCache
Implements IDistributedCache
Ereditarietà
MemoryDistributedCache
Implementazioni

Costruttori

Nome Descrizione
MemoryDistributedCache(IOptions<MemoryDistributedCacheOptions>, ILoggerFactory)

Crea una nuova istanza di MemoryDistributedCache.

MemoryDistributedCache(IOptions<MemoryDistributedCacheOptions>)

Crea una nuova istanza di MemoryDistributedCache.

Metodi

Nome Descrizione
Get(String)

Ottiene l'elemento specificato associato a una chiave da IMemoryCache come matrice di byte.

GetAsync(String, CancellationToken)

Ottiene in modo asincrono l'elemento specificato associato a una chiave da IMemoryCache come matrice di byte.

Refresh(String)

Aggiorna l'elemento specificato associato a una chiave da IMemoryCache.

RefreshAsync(String, CancellationToken)

Aggiorna in modo asincrono l'elemento specificato associato a una chiave da IMemoryCache.

Remove(String)

Rimuove l'elemento specificato associato a una chiave da IMemoryCache.

RemoveAsync(String, CancellationToken)

Rimuove in modo asincrono l'elemento specificato associato a una chiave da IMemoryCache.

Set(String, Byte[], DistributedCacheEntryOptions)

Imposta l'elemento specificato associato a una chiave nell'oggetto IMemoryCache come matrice di byte.

SetAsync(String, Byte[], DistributedCacheEntryOptions, CancellationToken)

Imposta in modo asincrono l'elemento specificato associato a una chiave in IMemoryCache come matrice di byte.

Metodi di estensione

Nome Descrizione
GetString(IDistributedCache, String)

Ottiene una stringa dalla cache specificata con la chiave specificata.

GetStringAsync(IDistributedCache, String, CancellationToken)

Ottiene in modo asincrono una stringa dalla cache specificata con la chiave specificata.

Set(IDistributedCache, String, Byte[])

Imposta una sequenza di byte nella cache specificata con la chiave specificata.

SetAsync(IDistributedCache, String, Byte[], CancellationToken)

Imposta in modo asincrono una sequenza di byte nella cache specificata con la chiave specificata.

SetString(IDistributedCache, String, String, DistributedCacheEntryOptions)

Imposta una stringa nella cache specificata con la chiave specificata.

SetString(IDistributedCache, String, String)

Imposta una stringa nella cache specificata con la chiave specificata.

SetStringAsync(IDistributedCache, String, String, CancellationToken)

Imposta in modo asincrono una stringa nella cache specificata con la chiave specificata.

SetStringAsync(IDistributedCache, String, String, DistributedCacheEntryOptions, CancellationToken)

Imposta in modo asincrono una stringa nella cache specificata con la chiave specificata.

Si applica a