DistributedCacheExtensions.Set(IDistributedCache, String, Byte[]) Metod
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
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.