Share via


HttpRuntimeSection.EnableKernelOutputCache プロパティ

定義

出力キャッシュが有効かどうかを示す値を取得または設定します。

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

プロパティ値

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 によって明示的に有効にする必要があります。

  • キャッシュには有効期限ポリシーが必要です。このポリシーは、破棄するタイミングをカーネルが認識できるようにする必要があります。

  • キャッシュには、変数ヘッダーまたはパラメーターを含めることはできません。

  • 要求では、認証は必要ありません。

注意

このプロパティは、インターネット インフォメーション サービス (IIS) バージョン 6.0 以降がインストールされている場合にのみ関連します。

適用対象

こちらもご覧ください