DistributedCacheExtensions.Set(IDistributedCache, String, Byte[]) Método

Definición

Establece una secuencia de bytes en la caché especificada con la clave especificada.

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

La caché en la que se van a almacenar los datos.

key
String

La clave en la que se van a almacenar los datos.

value
Byte[]

Los datos que se van a almacenar en la caché.

Excepciones

key o value es null.

Se aplica a