Share via


OutputCacheSection.EnableFragmentCache Propriété

Définition

Obtient ou définit une valeur indiquant si le cache de fragment est activé.

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

Valeur de propriété

true si le cache de fragment est activé ; sinon false. La valeur par défaut est true.

Attributs

Exemples

L'exemple de code suivant montre comment utiliser la propriété 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

Remarques

Si la propriété a la EnableFragmentCachefalsevaleur , aucune sortie de contrôle utilisateur n’est mise en cache, quels que soient la directive @ OutputCache ou le profil de mise en cache utilisé. Pour plus d’informations, consultez OutputCacheSettingsSection et OutputCacheProfile.

S’applique à

Voir aussi