DistributedCacheExtensions.GetStringAsync DistributedCacheExtensions.GetStringAsync DistributedCacheExtensions.GetStringAsync DistributedCacheExtensions.GetStringAsync Method

Definition

Overloads

GetStringAsync(IDistributedCache, String) GetStringAsync(IDistributedCache, String) GetStringAsync(IDistributedCache, String) GetStringAsync(IDistributedCache, String)

Asynchronously gets a string from the specified cache with the specified key.

GetStringAsync(IDistributedCache, String, CancellationToken) GetStringAsync(IDistributedCache, String, CancellationToken) GetStringAsync(IDistributedCache, String, CancellationToken)

Asynchronously gets a string from the specified cache with the specified key.

GetStringAsync(IDistributedCache, String) GetStringAsync(IDistributedCache, String) GetStringAsync(IDistributedCache, String) GetStringAsync(IDistributedCache, String)

Asynchronously gets a string from the specified cache with the specified key.

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

Parameters

cache
IDistributedCache IDistributedCache IDistributedCache IDistributedCache

The cache in which to store the data.

key
String String String String

The key to get the stored data for.

Returns

A task that gets the string value from the stored cache key.

GetStringAsync(IDistributedCache, String, CancellationToken) GetStringAsync(IDistributedCache, String, CancellationToken) GetStringAsync(IDistributedCache, String, CancellationToken)

Asynchronously gets a string from the specified cache with the specified key.

public static System.Threading.Tasks.Task<string> GetStringAsync (this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key, System.Threading.CancellationToken token = null);
static member GetStringAsync : Microsoft.Extensions.Caching.Distributed.IDistributedCache * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
<Extension()>
Public Function GetStringAsync (cache As IDistributedCache, key As String, Optional token As CancellationToken = null) As Task(Of String)

Parameters

cache
IDistributedCache IDistributedCache IDistributedCache IDistributedCache

The cache in which to store the data.

key
String String String String

The key to get the stored data for.

Returns

A task that gets the string value from the stored cache key.

Applies to