Язык

DistributedCacheExtensions.Set(IDistributedCache, String, Byte[]) Метод

Определение

Задает последовательность байтов в указанном кэше с указанным ключом.

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

Параметры

cache
IDistributedCache

Кэш, в котором хранятся данные.

key
String

Ключ для хранения данных в.

value
Byte[]

Данные для хранения в кэше.

Исключения

key или value имеет значение NULL.

Применяется к