OutputCacheAttribute 類別

定義

表示用來標示將會快取其輸出之動作方法的屬性。

[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
繼承
屬性
實作

建構函式

OutputCacheAttribute()

初始化 OutputCacheAttribute 類別的新執行個體。

屬性

AllowMultiple

取得或設定值,這個值表示是否可以指定多個篩選條件屬性執行個體。

(繼承來源 FilterAttribute)
CacheProfile

取得或設定快取設定檔名稱。

ChildActionCache

取得或設定子動作快取。

Duration

取得或設定快取期間 (秒鐘)。

Location

取得或設定位置。

NoStore

取得或設定值,這個值表示是否要儲存快取。

Order

取得或設定動作篩選條件的執行順序。

(繼承來源 FilterAttribute)
SqlDependency

取得或設定 SQL 相依性。

VaryByContentEncoding

取得或設定依內容區分的編碼方式。

VaryByCustom

取得或設定依自訂區分的值。

VaryByHeader

取得或設定依標頭區分的值。

VaryByParam

取得或設定依參數區分的值。

方法

IsChildActionCacheActive(ControllerContext)

傳回值,這個值表示子動作快取是否作用中。

OnActionExecuted(ActionExecutedContext)

此方法是 的實作 OnActionExecuted(ActionExecutedContext) ,並支援 ASP.NET MVC 基礎結構。 但並不是針對直接從程式碼使用而設計。

OnActionExecuting(ActionExecutingContext)

此方法是 的實作 OnActionExecuting(ActionExecutingContext) ,並支援 ASP.NET MVC 基礎結構。 但並不是針對直接從程式碼使用而設計。

OnException(ExceptionContext)

此方法是 的實作 OnException(ExceptionContext) ,並支援 ASP.NET MVC 基礎結構。 但並不是針對直接從程式碼使用而設計。

OnResultExecuted(ResultExecutedContext)

此方法是 的實作 OnResultExecuted(ResultExecutedContext) ,並支援 ASP.NET MVC 基礎結構。 但並不是針對直接從程式碼使用而設計。

OnResultExecuting(ResultExecutingContext)

在動作結果執行之前呼叫。

適用於