Share via


OutputCacheSection.EnableOutputCache Proprietà

Definizione

Ottiene o imposta un valore che indica se la cache di output è attivata.

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 è attivata. In caso contrario, false. Il valore predefinito è true.

Attributi

Esempio

Nell'esempio di codice riportato di seguito viene illustrato come utilizzare la proprietà 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

Commenti

Se la EnableFragmentCache proprietà è impostata su false, nessuna pagina viene memorizzata nella cache nel server, indipendentemente dalle impostazioni in @ Direttiva OutputCache o dal profilo di memorizzazione nella cache utilizzata dalla pagina. Per altre informazioni, vedere OutputCacheSettingsSection e OutputCacheProfile.

Si applica a

Vedi anche