RedisCache Classe

Definizione

Implementazione della cache distribuita con Redis.

Usa StackExchange.Redis come client Redis.

public ref class RedisCache : IDisposable, Microsoft::Extensions::Caching::Distributed::IBufferDistributedCache
public class RedisCache : IDisposable, Microsoft.Extensions.Caching.Distributed.IBufferDistributedCache
type RedisCache = class
    interface IBufferDistributedCache
    interface IDistributedCache
    interface IDisposable
Public Class RedisCache
Implements IBufferDistributedCache, IDisposable
Ereditarietà
RedisCache
Implementazioni

Costruttori

Nome Descrizione
RedisCache(IOptions<RedisCacheOptions>)

Inizializza una nuova istanza di RedisCache.

Metodi

Nome Descrizione
Dispose()

Esegue attività definite dall'applicazione associate alla liberazione, al rilascio o alla reimpostazione di risorse non gestite.

Get(String)

Ottiene un valore con la chiave specificata.

GetAsync(String, CancellationToken)

Ottiene un valore con la chiave specificata.

Refresh(String)

Aggiorna un valore nella cache in base alla relativa chiave, reimpostando il timeout di scadenza scorrevole (se presente).

RefreshAsync(String, CancellationToken)

Aggiorna un valore nella cache in base alla relativa chiave, reimpostando il timeout di scadenza scorrevole (se presente).

Remove(String)

Rimuove il valore con la chiave specificata.

RemoveAsync(String, CancellationToken)

Rimuove il valore con la chiave specificata.

Set(String, Byte[], DistributedCacheEntryOptions)

Imposta un valore con la chiave specificata.

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

Imposta il valore con la chiave specificata.

Implementazioni dell'interfaccia esplicita

Nome Descrizione
IBufferDistributedCache.Set(String, ReadOnlySequence<Byte>, DistributedCacheEntryOptions)

Implementazione della cache distribuita con Redis.

Usa StackExchange.Redis come client Redis.

IBufferDistributedCache.SetAsync(String, ReadOnlySequence<Byte>, DistributedCacheEntryOptions, CancellationToken)

Implementazione della cache distribuita con Redis.

Usa StackExchange.Redis come client Redis.

IBufferDistributedCache.TryGet(String, IBufferWriter<Byte>)

Implementazione della cache distribuita con Redis.

Usa StackExchange.Redis come client Redis.

IBufferDistributedCache.TryGetAsync(String, IBufferWriter<Byte>, CancellationToken)

Implementazione della cache distribuita con Redis.

Usa StackExchange.Redis come client Redis.

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