IOutputCachePolicy.ServeFromCacheAsync 方法

定义

在使用缓存响应之前更新 OutputCacheContext。 此时,可以更新缓存响应的新鲜度。

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

参数

context
OutputCacheContext

当前请求的缓存上下文。

cancellation
CancellationToken

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

返回

适用于