Bagikan melalui


DistributedCacheExtensions.SetString Metode

Definisi

Overload

SetString(IDistributedCache, String, String)

Mengatur string dalam cache yang ditentukan dengan kunci yang ditentukan.

SetString(IDistributedCache, String, String, DistributedCacheEntryOptions)

Mengatur string dalam cache yang ditentukan dengan kunci yang ditentukan.

SetString(IDistributedCache, String, String)

Sumber:
DistributedCacheExtensions.cs
Sumber:
DistributedCacheExtensions.cs
Sumber:
DistributedCacheExtensions.cs
Sumber:
DistributedCacheExtensions.cs

Mengatur string dalam cache yang ditentukan dengan kunci yang ditentukan.

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)

Parameter

cache
IDistributedCache

Cache untuk menyimpan data.

key
String

Kunci untuk menyimpan data.

value
String

Data yang akan disimpan di cache.

Pengecualian

key atau value adalah null.

Berlaku untuk

SetString(IDistributedCache, String, String, DistributedCacheEntryOptions)

Sumber:
DistributedCacheExtensions.cs
Sumber:
DistributedCacheExtensions.cs
Sumber:
DistributedCacheExtensions.cs
Sumber:
DistributedCacheExtensions.cs

Mengatur string dalam cache yang ditentukan dengan kunci yang ditentukan.

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)

Parameter

cache
IDistributedCache

Cache untuk menyimpan data.

key
String

Kunci untuk menyimpan data.

value
String

Data yang akan disimpan di cache.

options
DistributedCacheEntryOptions

Opsi cache untuk entri.

Pengecualian

key atau value adalah null.

Berlaku untuk