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 です。

適用対象