MemoryDistributedCache Classe

Definição

Implementos IDistributedCache que usam IMemoryCache.

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
Herança
MemoryDistributedCache
Implementações

Construtores

Name Description
MemoryDistributedCache(IOptions<MemoryDistributedCacheOptions>, ILoggerFactory)

Cria uma nova MemoryDistributedCache instância.

MemoryDistributedCache(IOptions<MemoryDistributedCacheOptions>)

Cria uma nova MemoryDistributedCache instância.

Métodos

Name Description
Get(String)

Obtém o item especificado associado a uma chave do IMemoryCache como um array de bytes.

GetAsync(String, CancellationToken)

De forma assíncrona, obtém-se o item especificado associado a uma chave IMemoryCache como um array de bytes.

Refresh(String)

Atualiza o item especificado associado a uma chave do IMemoryCache.

RefreshAsync(String, CancellationToken)

Atualiza assíncronamente o item especificado associado a uma chave do IMemoryCache.

Remove(String)

Remove o item especificado associado a uma chave do IMemoryCache.

RemoveAsync(String, CancellationToken)

De forma assíncrona, remove o item especificado associado a uma chave do IMemoryCache.

Set(String, Byte[], DistributedCacheEntryOptions)

Define o item especificado associado a uma chave no IMemoryCache como um array de bytes.

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

Define assíncronamente o item especificado associado a uma chave no IMemoryCache como um array de bytes.

Métodos da Extensão

Name Description
GetString(IDistributedCache, String)

Obtém uma string da cache especificada com a chave especificada.

GetStringAsync(IDistributedCache, String, CancellationToken)

De forma assíncrona, obtém-se uma string do cache especificado com a chave especificada.

Set(IDistributedCache, String, Byte[])

Define uma sequência de bytes na cache especificada com a chave especificada.

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

Estabelece assíncronamente uma sequência de bytes na cache especificada com a chave especificada.

SetString(IDistributedCache, String, String, DistributedCacheEntryOptions)

Define uma string na cache especificada com a chave especificada.

SetString(IDistributedCache, String, String)

Define uma string na cache especificada com a chave especificada.

SetStringAsync(IDistributedCache, String, String, CancellationToken)

De forma assíncrona, define uma string na cache especificada com a chave especificada.

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

De forma assíncrona, define uma string na cache especificada com a chave especificada.

Aplica-se a