DistributedCacheExtensions.Set(IDistributedCache, String, Byte[]) Método
Definição
Define uma sequência de bytes no cache especificado com a chave especificada.Sets a sequence of bytes in the specified cache with the specified key.
public:
[System::Runtime::CompilerServices::Extension]
static void Set(Microsoft::Extensions::Caching::Distributed::IDistributedCache ^ cache, System::String ^ key, cli::array <System::Byte> ^ value);
public static void Set (this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key, byte[] value);
static member Set : Microsoft.Extensions.Caching.Distributed.IDistributedCache * string * byte[] -> unit
<Extension()>
Public Sub Set (cache As IDistributedCache, key As String, value As Byte())
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
- Byte[]
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.