IDistributedCache.SetAsync Método

Definição

Sobrecargas

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

Define o valor com a chave fornecida.

SetAsync(String, Byte[], DistributedCacheEntryOptions)

public:
 System::Threading::Tasks::Task ^ SetAsync(System::String ^ key, cli::array <System::Byte> ^ value, Microsoft::Extensions::Caching::Distributed::DistributedCacheEntryOptions ^ options);
public System.Threading.Tasks.Task SetAsync (string key, byte[] value, Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions options);
abstract member SetAsync : string * byte[] * Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions -> System.Threading.Tasks.Task
Public Function SetAsync (key As String, value As Byte(), options As DistributedCacheEntryOptions) As Task

Parâmetros

key
String
value
Byte[]

Retornos

Task

Aplica-se a

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

Define o valor com a chave fornecida.

public System.Threading.Tasks.Task SetAsync (string key, byte[] value, Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions options, System.Threading.CancellationToken token = default);
abstract member SetAsync : string * byte[] * Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function SetAsync (key As String, value As Byte(), options As DistributedCacheEntryOptions, Optional token As CancellationToken = Nothing) As Task

Parâmetros

key
String

Uma cadeia de caracteres que identifica o valor solicitado.

value
Byte[]

O valor a ser definido no cache.

options
DistributedCacheEntryOptions

As opções de cache para o valor.

token
CancellationToken

Opcional. O CancellationToken usado para propagar notificações de que a operação deve ser cancelada.

Retornos

Task

A Task que representa a operação assíncrona.

Aplica-se a