Share via


IOutputCachePolicy.ServeFromCacheAsync Method

Definition

Updates the OutputCacheContext before the cached response is used. At that point the freshness of the cached response can be updated.

public System.Threading.Tasks.ValueTask ServeFromCacheAsync (Microsoft.AspNetCore.OutputCaching.OutputCacheContext context, System.Threading.CancellationToken cancellation);
abstract member ServeFromCacheAsync : Microsoft.AspNetCore.OutputCaching.OutputCacheContext * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask
Public Function ServeFromCacheAsync (context As OutputCacheContext, cancellation As CancellationToken) As ValueTask

Parameters

context
OutputCacheContext

The current request's cache context.

cancellation
CancellationToken

The token to monitor for cancellation requests.

Returns

Applies to