DistributedCacheExtensions.SetStringAsync Método
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Sobrecargas
SetStringAsync(IDistributedCache, String, String) |
Define de forma assíncrona uma cadeia de caracteres no cache especificado com a chave especificada. |
SetStringAsync(IDistributedCache, String, String, DistributedCacheEntryOptions) |
Define de forma assíncrona uma cadeia de caracteres no cache especificado com a chave especificada. |
SetStringAsync(IDistributedCache, String, String, CancellationToken) |
Define de forma assíncrona uma cadeia de caracteres no cache especificado com a chave especificada. |
SetStringAsync(IDistributedCache, String, String, DistributedCacheEntryOptions, CancellationToken) |
Define de forma assíncrona uma cadeia de caracteres no cache especificado com a chave especificada. |
SetStringAsync(IDistributedCache, String, String)
Define de forma assíncrona uma cadeia de caracteres no cache especificado com a chave especificada.
public:
[System::Runtime::CompilerServices::Extension]
static System::Threading::Tasks::Task ^ SetStringAsync(Microsoft::Extensions::Caching::Distributed::IDistributedCache ^ cache, System::String ^ key, System::String ^ value);
public static System.Threading.Tasks.Task SetStringAsync (this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key, string value);
static member SetStringAsync : Microsoft.Extensions.Caching.Distributed.IDistributedCache * string * string -> System.Threading.Tasks.Task
<Extension()>
Public Function SetStringAsync (cache As IDistributedCache, key As String, value As String) As Task
Parâmetros
- cache
- IDistributedCache
O cache no qual armazenar os dados.
- key
- String
A chave na qual armazenar os dados.
- value
- String
Os dados a armazenar no cache.
Retornos
Uma tarefa que representa a operação de conjuntos assíncrona.
Exceções
key
ou value
é nulo.
Aplica-se a
SetStringAsync(IDistributedCache, String, String, DistributedCacheEntryOptions)
Define de forma assíncrona uma cadeia de caracteres no cache especificado com a chave especificada.
public:
[System::Runtime::CompilerServices::Extension]
static System::Threading::Tasks::Task ^ SetStringAsync(Microsoft::Extensions::Caching::Distributed::IDistributedCache ^ cache, System::String ^ key, System::String ^ value, Microsoft::Extensions::Caching::Distributed::DistributedCacheEntryOptions ^ options);
public static System.Threading.Tasks.Task SetStringAsync (this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key, string value, Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions options);
static member SetStringAsync : Microsoft.Extensions.Caching.Distributed.IDistributedCache * string * string * Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions -> System.Threading.Tasks.Task
<Extension()>
Public Function SetStringAsync (cache As IDistributedCache, key As String, value As String, options As DistributedCacheEntryOptions) As Task
Parâmetros
- cache
- IDistributedCache
O cache no qual armazenar os dados.
- key
- String
A chave na qual armazenar os dados.
- value
- String
Os dados a armazenar no cache.
- options
- DistributedCacheEntryOptions
As opções de cache para a entrada.
Retornos
Uma tarefa que representa a operação de conjuntos assíncrona.
Exceções
key
ou value
é nulo.
Aplica-se a
SetStringAsync(IDistributedCache, String, String, CancellationToken)
Define de forma assíncrona uma cadeia de caracteres no cache especificado com a chave especificada.
public static System.Threading.Tasks.Task SetStringAsync (this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key, string value, System.Threading.CancellationToken token = default);
static member SetStringAsync : Microsoft.Extensions.Caching.Distributed.IDistributedCache * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task
<Extension()>
Public Function SetStringAsync (cache As IDistributedCache, key As String, value As String, Optional token As CancellationToken = Nothing) As Task
Parâmetros
- cache
- IDistributedCache
O cache no qual armazenar os dados.
- key
- String
A chave na qual armazenar os dados.
- value
- String
Os dados a armazenar no cache.
- token
- CancellationToken
Opcional. Um CancellationToken para cancelar a operação.
Retornos
Uma tarefa que representa a operação de conjuntos assíncrona.
Exceções
key
ou value
é nulo.
Aplica-se a
SetStringAsync(IDistributedCache, String, String, DistributedCacheEntryOptions, CancellationToken)
Define de forma assíncrona uma cadeia de caracteres no cache especificado com a chave especificada.
public static System.Threading.Tasks.Task SetStringAsync (this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key, string value, Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions options, System.Threading.CancellationToken token = default);
static member SetStringAsync : Microsoft.Extensions.Caching.Distributed.IDistributedCache * string * string * Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task
<Extension()>
Public Function SetStringAsync (cache As IDistributedCache, key As String, value As String, options As DistributedCacheEntryOptions, Optional token As CancellationToken = Nothing) As Task
Parâmetros
- cache
- IDistributedCache
O cache no qual armazenar os dados.
- key
- String
A chave na qual armazenar os dados.
- value
- String
Os dados a armazenar no cache.
- options
- DistributedCacheEntryOptions
As opções de cache para a entrada.
- token
- CancellationToken
Opcional. Um CancellationToken para cancelar a operação.
Retornos
Uma tarefa que representa a operação de conjuntos assíncrona.
Exceções
key
ou value
é nulo.