Share via


IOutputCacheBufferStore.TryGetAsync 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<bool> TryGetAsync (string key, System.IO.Pipelines.PipeWriter destination, System.Threading.CancellationToken cancellationToken);
abstract member TryGetAsync : string * System.IO.Pipelines.PipeWriter * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<bool>
Public Function TryGetAsync (key As String, destination As PipeWriter, cancellationToken As CancellationToken) As ValueTask(Of Boolean)

Parameters

key
String

The cache key to look up.

destination
PipeWriter

The location to which the value should be written.

cancellationToken
CancellationToken

Indicates that the operation should be cancelled.

Returns

True if the response cache entry if it exists; otherwise False.

Applies to