DistributedCacheExtensions.SetString Método

Definição

Sobrecargas

SetString(IDistributedCache, String, String)

Define uma cadeia de caracteres no cache especificado com a chave especificada.Sets a string in the specified cache with the specified key.

SetString(IDistributedCache, String, String, DistributedCacheEntryOptions)

Define uma cadeia de caracteres no cache especificado com a chave especificada.Sets a string in the specified cache with the specified key.

SetString(IDistributedCache, String, String)

Define uma cadeia de caracteres no cache especificado com a chave especificada.Sets a string in the specified cache with the specified key.

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

O cache no qual armazenar os dados.The cache in which to store the data.

key
String

A chave na qual armazenar os dados.The key to store the data in.

value
String

Os dados a armazenar no cache.The data to store in the cache.

Exceções

Gerado quando key ou value é nulo.Thrown when key or value is null.

Aplica-se a

SetString(IDistributedCache, String, String, DistributedCacheEntryOptions)

Define uma cadeia de caracteres no cache especificado com a chave especificada.Sets a string in the specified cache with the specified key.

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

O cache no qual armazenar os dados.The cache in which to store the data.

key
String

A chave na qual armazenar os dados.The key to store the data in.

value
String

Os dados a armazenar no cache.The data to store in the cache.

options
DistributedCacheEntryOptions

As opções de cache para a entrada.The cache options for the entry.

Exceções

Gerado quando key ou value é nulo.Thrown when key or value is null.

Aplica-se a