OutputCacheAttribute OutputCacheAttribute 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() OutputCacheAttribute() OutputCacheAttribute()

Initializes a new instance of the OutputCacheAttribute class.

Properties

AllowMultiple AllowMultiple AllowMultiple

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

(Inherited from FilterAttribute)
CacheProfile CacheProfile CacheProfile

Gets or sets the cache profile name.

ChildActionCache ChildActionCache ChildActionCache

Gets or sets the child action cache.

Duration Duration Duration

Gets or sets the cache duration, in seconds.

Location Location Location

Gets or sets the location.

NoStore NoStore NoStore

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

Order Order Order

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

(Inherited from FilterAttribute)
SqlDependency SqlDependency SqlDependency

Gets or sets the SQL dependency.

VaryByContentEncoding VaryByContentEncoding VaryByContentEncoding

Gets or sets the vary-by-content encoding.

VaryByCustom VaryByCustom VaryByCustom

Gets or sets the vary-by-custom value.

VaryByHeader VaryByHeader VaryByHeader

Gets or sets the vary-by-header value.

VaryByParam VaryByParam VaryByParam

Gets or sets the vary-by-param value.

Methods

IsChildActionCacheActive(ControllerContext) IsChildActionCacheActive(ControllerContext) IsChildActionCacheActive(ControllerContext)

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

OnActionExecuted(ActionExecutedContext) OnActionExecuted(ActionExecutedContext) 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) OnActionExecuting(ActionExecutingContext) 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) OnException(ExceptionContext) 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) OnResultExecuted(ResultExecutedContext) 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) OnResultExecuting(ResultExecutingContext) OnResultExecuting(ResultExecutingContext)

Called before the action result executes.

Applies to