Share via


OutputCacheSection.EnableFragmentCache Proprietà

Definizione

Ottiene o imposta un valore che indica se la cache a livello di frammento è attivata.

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

Valore della proprietà

true se la cache a livello di frammento è attivata. In caso contrario, false. Il valore predefinito è true.

Attributi

Esempio

Nell'esempio di codice riportato di seguito viene illustrato come utilizzare la proprietà EnableFragmentCache.


// Get the current EnabledFragmentCache.
Boolean enabledFragmentCache =
    outputCacheSection.EnableFragmentCache;

// Set the EnabledFragmentCache.
outputCacheSection.EnableFragmentCache = false;
' Get the current EnabledFragmentCache.
  Dim enabledFragmentCache As [Boolean] = _
  outputCacheSection.EnableFragmentCache

' Set the EnabledFragmentCache.
outputCacheSection.EnableFragmentCache = False

Commenti

Se la EnableFragmentCache proprietà è impostata su false, non viene memorizzato nella cache alcun output del controllo utente, indipendentemente dalla direttiva @ OutputCache o dal profilo di memorizzazione nella cache utilizzato. Per altre informazioni, vedere OutputCacheSettingsSection e OutputCacheProfile.

Si applica a

Vedi anche