DistributedCacheExtensions.SetString Metoda
Definicja
Ważne
Niektóre informacje odnoszą się do produktu w wersji wstępnej, który może zostać znacząco zmodyfikowany przed wydaniem. Firma Microsoft nie udziela żadnych gwarancji, jawnych lub domniemanych, w odniesieniu do informacji podanych w tym miejscu.
Przeciążenia
SetString(IDistributedCache, String, String) |
Ustawia ciąg w określonej pamięci podręcznej przy użyciu określonego klucza. |
SetString(IDistributedCache, String, String, DistributedCacheEntryOptions) |
Ustawia ciąg w określonej pamięci podręcznej przy użyciu określonego klucza. |
SetString(IDistributedCache, String, String)
Ustawia ciąg w określonej pamięci podręcznej przy użyciu określonego klucza.
public:
[System::Runtime::CompilerServices::Extension]
static void SetString(Microsoft::Extensions::Caching::Distributed::IDistributedCache ^ cache, System::String ^ key, System::String ^ value);
public static void SetString (this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key, string value);
static member SetString : Microsoft.Extensions.Caching.Distributed.IDistributedCache * string * string -> unit
<Extension()>
Public Sub SetString (cache As IDistributedCache, key As String, value As String)
Parametry
- cache
- IDistributedCache
Pamięć podręczna, w której mają być przechowywane dane.
- key
- String
Klucz do przechowywania danych.
- value
- String
Dane do przechowywania w pamięci podręcznej.
Wyjątki
key
lub value
ma wartość null.
Dotyczy
SetString(IDistributedCache, String, String, DistributedCacheEntryOptions)
Ustawia ciąg w określonej pamięci podręcznej przy użyciu określonego klucza.
public:
[System::Runtime::CompilerServices::Extension]
static void SetString(Microsoft::Extensions::Caching::Distributed::IDistributedCache ^ cache, System::String ^ key, System::String ^ value, Microsoft::Extensions::Caching::Distributed::DistributedCacheEntryOptions ^ options);
public static void SetString (this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key, string value, Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions options);
static member SetString : Microsoft.Extensions.Caching.Distributed.IDistributedCache * string * string * Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions -> unit
<Extension()>
Public Sub SetString (cache As IDistributedCache, key As String, value As String, options As DistributedCacheEntryOptions)
Parametry
- cache
- IDistributedCache
Pamięć podręczna, w której mają być przechowywane dane.
- key
- String
Klucz do przechowywania danych.
- value
- String
Dane do przechowywania w pamięci podręcznej.
- options
- DistributedCacheEntryOptions
Opcje pamięci podręcznej wpisu.
Wyjątki
key
lub value
ma wartość null.