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

Définition

Définit une séquence d’octets dans le cache spécifié avec la clé spécifiée.

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())

Paramètres

cache
IDistributedCache

Cache dans lequel stocker les données.

key
String

Clé dans laquelle stocker les données.

value
Byte[]

Données à stocker dans le cache.

Exceptions

key ou value est null.

S’applique à