DistributedCacheExtensions.GetString(IDistributedCache, String) メソッド

定義

指定したキーを使用して、指定したキャッシュから文字列を取得します。

public:
[System::Runtime::CompilerServices::Extension]
 static System::String ^ GetString(Microsoft::Extensions::Caching::Distributed::IDistributedCache ^ cache, System::String ^ key);
public static string GetString (this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key);
public static string? GetString (this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key);
static member GetString : Microsoft.Extensions.Caching.Distributed.IDistributedCache * string -> string
<Extension()>
Public Function GetString (cache As IDistributedCache, key As String) As String

パラメーター

cache
IDistributedCache

データを格納するキャッシュ。

key
String

格納されているデータを取得するキー。

戻り値

格納されているキャッシュ キーからの文字列値。

適用対象