IOutputCachePolicy.CacheRequestAsync Method

Definition

Updates the OutputCacheContext before the cache middleware is invoked. At that point the cache middleware can still be enabled or disabled for the request.

public System.Threading.Tasks.ValueTask CacheRequestAsync (Microsoft.AspNetCore.OutputCaching.OutputCacheContext context, System.Threading.CancellationToken cancellation);
abstract member CacheRequestAsync : Microsoft.AspNetCore.OutputCaching.OutputCacheContext * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask
Public Function CacheRequestAsync (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