DistributedCacheExtensions.Set(IDistributedCache, String, Byte[]) Metod

Definition

Anger en sekvens med byte i den angivna cachen med den angivna nyckeln.

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

Parametrar

cache
IDistributedCache

Cachen där data ska lagras.

key
String

Nyckeln för att lagra data i.

value
Byte[]

De data som ska lagras i cacheminnet.

Undantag

key eller value är null.

Gäller för