Delen via


OutputCacheAttribute Class

Definition

Represents an attribute that is used to mark an action method whose output will be cached.

[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
public class OutputCacheAttribute : System.Web.Mvc.ActionFilterAttribute, System.Web.Mvc.IExceptionFilter
type OutputCacheAttribute = class
    inherit ActionFilterAttribute
    interface IExceptionFilter
Public Class OutputCacheAttribute
Inherits ActionFilterAttribute
Implements IExceptionFilter
Inheritance
Attributes
Implements

Constructors

OutputCacheAttribute()

Initializes a new instance of the OutputCacheAttribute class.

Properties

AllowMultiple

Gets or sets a value that indicates whether more than one instance of the filter attribute can be specified.

(Inherited from FilterAttribute)
CacheProfile

Gets or sets the cache profile name.

ChildActionCache

Gets or sets the child action cache.

Duration

Gets or sets the cache duration, in seconds.

Location

Gets or sets the location.

NoStore

Gets or sets a value that indicates whether to store the cache.

Order

Gets or sets the order in which the action filters are executed.

(Inherited from FilterAttribute)
SqlDependency

Gets or sets the SQL dependency.

VaryByContentEncoding

Gets or sets the vary-by-content encoding.

VaryByCustom

Gets or sets the vary-by-custom value.

VaryByHeader

Gets or sets the vary-by-header value.

VaryByParam

Gets or sets the vary-by-param value.

Methods

IsChildActionCacheActive(ControllerContext)

Returns a value that indicates whether a child action cache is active.

OnActionExecuted(ActionExecutedContext)

This method is an implementation of OnActionExecuted(ActionExecutedContext) and supports the ASP.NET MVC infrastructure. It is not intended to be used directly from your code.

OnActionExecuting(ActionExecutingContext)

This method is an implementation of OnActionExecuting(ActionExecutingContext) and supports the ASP.NET MVC infrastructure. It is not intended to be used directly from your code.

OnException(ExceptionContext)

This method is an implementation of OnException(ExceptionContext) and supports the ASP.NET MVC infrastructure. It is not intended to be used directly from your code.

OnResultExecuted(ResultExecutedContext)

This method is an implementation of OnResultExecuted(ResultExecutedContext) and supports the ASP.NET MVC infrastructure. It is not intended to be used directly from your code.

OnResultExecuting(ResultExecutingContext)

Called before the action result executes.

Applies to