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.

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