IOutputCachePolicy.CacheRequestAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
在调用缓存中间件之前更新 OutputCacheContext。 此时,仍可以为请求启用或禁用缓存中间件。
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
参数
- context
- OutputCacheContext
当前请求的缓存上下文。
- cancellation
- CancellationToken
用于监视取消请求的令牌。