IOutputCachePolicy.ServeResponseAsync 方法

定义

在提供响应之前更新 OutputCacheContext,并且可以缓存。 此时,可以更新响应的可缓存性。

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

参数

context
OutputCacheContext

当前请求的缓存上下文。

cancellation
CancellationToken

用于监视取消请求的令牌。

返回

适用于