Share via


IOutputCacheStore.GetAsync(String, CancellationToken) Method

Definition

Gets the cached response for the given key, if it exists. If no cached response exists for the given key, null is returned.

public System.Threading.Tasks.ValueTask<byte[]?> GetAsync (string key, System.Threading.CancellationToken cancellationToken);
abstract member GetAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<byte[]>
Public Function GetAsync (key As String, cancellationToken As CancellationToken) As ValueTask(Of Byte())

Parameters

key
String

The cache key to look up.

cancellationToken
CancellationToken

Indicates that the operation should be cancelled.

Returns

The response cache entry if it exists; otherwise null.

Applies to