Freigeben über


OutputCacheSection.EnableOutputCache Eigenschaft

Definition

Dient zum Abrufen oder Festlegen eines Werts, der angibt, ob der Ausgabecache aktiviert ist.

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

Eigenschaftswert

truewenn der Ausgabecache aktiviert ist; andernfalls . false Der Standardwert lautet true.

Attribute

Beispiele

Das folgende Codebeispiel zeigt, wie die EnableOutputCache Eigenschaft verwendet wird.


// 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

Hinweise

Wenn die Eigenschaft auf <a0/> festgelegt ist, wird keine Seite auf dem Server zwischengespeichert, unabhängig von den Einstellungen in der @OutputCache-Direktive oder des Zwischenspeicherungsprofils, das von der Seite verwendet wird. Weitere Informationen finden Sie unter OutputCacheSettingsSection und OutputCacheProfile.

Gilt für:

Weitere Informationen