OutputCacheSection.EnableOutputCache Proprietà
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Ottiene o imposta un valore che indica se la cache di output è abilitata.
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
Valore della proprietà
true se la cache di output è abilitata; in caso contrario, false. Il valore predefinito è true.
- Attributi
Esempio
Nell'esempio di codice seguente viene illustrato come utilizzare la EnableOutputCache proprietà .
// 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
Commenti
Se la EnableFragmentCache proprietà è impostata su false, nessuna pagina viene memorizzata nella cache nel server, indipendentemente dalle impostazioni della direttiva @ OutputCache o dal profilo di memorizzazione nella cache utilizzato dalla pagina. Per altre informazioni, vedere OutputCacheSettingsSection e OutputCacheProfile.