OutputCacheSection.EnableFragmentCache Egenskap

Definition

Hämtar eller anger ett värde som anger om fragmentcachen är aktiverad.

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

Egenskapsvärde

trueom fragmentcachen är aktiverad; annars . false Standardvärdet är true.

Attribut

Exempel

Följande kodexempel visar hur du använder egenskapen 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

Kommentarer

Om egenskapen EnableFragmentCache är inställd på falsecachelagras inga utdata för användarkontroll, oavsett vilket @OutputCache-direktiv eller cachelagringsprofil som används. Mer information finns i OutputCacheSettingsSection och OutputCacheProfile.

Gäller för

Se även