DistributedCacheExtensions.SetString Método
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Sobrecargas
| Name | Description |
|---|---|
| SetString(IDistributedCache, String, String) |
Define uma string 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.
public:
[System::Runtime::CompilerServices::Extension]
static void SetString(Microsoft::Extensions::Caching::Distributed::IDistributedCache ^ cache, System::String ^ key, System::String ^ value);
public static void SetString(this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key, string value);
static member SetString : Microsoft.Extensions.Caching.Distributed.IDistributedCache * string * string -> unit
<Extension()>
Public Sub SetString (cache As IDistributedCache, key As String, value As String)
Parâmetros
- cache
- IDistributedCache
A cache onde guardar os dados.
- key
- String
A chave para armazenar os dados.
- value
- String
Os dados para armazenar na cache.
Exceções
key ou value é null.
Aplica-se a
SetString(IDistributedCache, String, String, DistributedCacheEntryOptions)
Define uma string na cache especificada com a chave especificada.
public:
[System::Runtime::CompilerServices::Extension]
static void SetString(Microsoft::Extensions::Caching::Distributed::IDistributedCache ^ cache, System::String ^ key, System::String ^ value, Microsoft::Extensions::Caching::Distributed::DistributedCacheEntryOptions ^ options);
public static void SetString(this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key, string value, Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions options);
static member SetString : Microsoft.Extensions.Caching.Distributed.IDistributedCache * string * string * Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions -> unit
<Extension()>
Public Sub SetString (cache As IDistributedCache, key As String, value As String, options As DistributedCacheEntryOptions)
Parâmetros
- cache
- IDistributedCache
A cache onde guardar os dados.
- key
- String
A chave para armazenar os dados.
- value
- String
Os dados para armazenar na cache.
- options
- DistributedCacheEntryOptions
As opções de cache para a entrada.
Exceções
key ou value é null.