Share via


OutputCacheSection.EnableOutputCache プロパティ

定義

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

public:
 property bool EnableOutputCache { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("enableOutputCache", DefaultValue=true)]
public bool EnableOutputCache { get; set; }
[<System.Configuration.ConfigurationProperty("enableOutputCache", DefaultValue=true)>]
member this.EnableOutputCache : bool with get, set
Public Property EnableOutputCache As Boolean

プロパティ値

Boolean

出力キャッシュが有効な場合は true。それ以外の場合は false。 既定値は、true です。

属性

次のコード例は、EnableOutputCache プロパティの使用方法を示しています。


// Get the current EnabledOutputCache.
Boolean enabledOutputCache = 
    outputCacheSection.EnableOutputCache;

// Set the EnabledOutputCache.
outputCacheSection.EnableOutputCache = false;
' Get the current EnabledOutputCache.
  Dim enabledOutputCache As [Boolean] = _
  outputCacheSection.EnableOutputCache

' Set the EnabledOutputCache.
outputCacheSection.EnableOutputCache = False

注釈

プロパティが EnableFragmentCache 設定 falseされている場合、 @OutputCache ディレクティブまたはページで使用されるキャッシュ プロファイルの設定に関係なく、サーバーにページはキャッシュされません。 詳細については、次のトピックを参照してください。 OutputCacheSettingsSection および OutputCacheProfile

適用対象

こちらもご覧ください