IOutputCachePolicy.ServeResponseAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
在提供响应之前更新 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
用于监视取消请求的令牌。