OutputCacheSection.EnableFragmentCache Property

Definition

Gets or sets a value indicating whether the fragment cache is enabled.

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

Property Value

true if the fragment cache is enabled; otherwise, false. The default is true.

Attributes

Examples

The following code example shows how to use the EnableFragmentCache property.


// 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

Remarks

If the EnableFragmentCache property is set to false, no user control output is cached, regardless of the @ OutputCache directive or caching profile used. For more information, see OutputCacheSettingsSection and OutputCacheProfile.

Applies to

See also