Share via


IOutputCachePolicy Interface

Definition

An implementation of this interface can update how the current request is cached.

public interface IOutputCachePolicy
type IOutputCachePolicy = interface
Public Interface IOutputCachePolicy

Methods

CacheRequestAsync(OutputCacheContext, CancellationToken)

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

ServeFromCacheAsync(OutputCacheContext, CancellationToken)

Updates the OutputCacheContext before the cached response is used. At that point the freshness of the cached response can be updated.

ServeResponseAsync(OutputCacheContext, CancellationToken)

Updates the OutputCacheContext before the response is served and can be cached. At that point cacheability of the response can be updated.

Applies to