HttpRuntimeSection.EnableKernelOutputCache 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定一個值,指示是否啟用輸出快取。
public:
property bool EnableKernelOutputCache { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("enableKernelOutputCache", DefaultValue=true)]
public bool EnableKernelOutputCache { get; set; }
[<System.Configuration.ConfigurationProperty("enableKernelOutputCache", DefaultValue=true)>]
member this.EnableKernelOutputCache : bool with get, set
Public Property EnableKernelOutputCache As Boolean
屬性值
true若啟用輸出快取;否則,。 false 預設值為 true。
- 屬性
範例
以下範例說明如何使用該 EnableKernelOutputCache 屬性。
// Get the current EnableKernelOutputCache property value.
Response.Write("EnableKernelOutputCache: " +
configSection.EnableKernelOutputCache + "<br>");
// Set the EnableKernelOutputCache property to true.
configSection.EnableKernelOutputCache = true;
' Get the current EnableKernelOutputCache property value.
Response.Write("EnableKernelOutputCache: " & _
configSection.EnableKernelOutputCache & "<br>")
' Set the EnableKernelOutputCache property to true.
configSection.EnableKernelOutputCache = True
備註
為了快取回應,需符合以下條件:
快取必須由頁面指令或快取 API 明確啟用。
快取必須有過期政策,讓核心知道何時丟棄它。
快取不能有任何變數標頭或參數。
申請必須不需要任何認證。
備註
此特性僅在安裝 Internet Information Services(IIS)版本 6.0 或更新版本時適用。