OutputCacheSection.EnableFragmentCache Property

 

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

Namespace:   System.Web.Configuration
Assembly:  System.Web (in System.Web.dll)

<ConfigurationPropertyAttribute("enableFragmentCache", DefaultValue := True)>
Public Property EnableFragmentCache As Boolean

Property Value

Type: System.Boolean

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

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.

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

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

' Set the EnabledFragmentCache.
outputCacheSection.EnableFragmentCache = False

.NET Framework
Available since 2.0
Return to top
Show: