OutputCacheSection.EnableOutputCache Egenskap
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Hämtar eller anger ett värde som anger om utdatacachen är aktiverad.
public:
property bool EnableOutputCache { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("enableOutputCache", DefaultValue=true)]
public bool EnableOutputCache { get; set; }
[<System.Configuration.ConfigurationProperty("enableOutputCache", DefaultValue=true)>]
member this.EnableOutputCache : bool with get, set
Public Property EnableOutputCache As Boolean
Egenskapsvärde
trueom utdatacachen är aktiverad. annars . false Standardvärdet är true.
- Attribut
Exempel
Följande kodexempel visar hur du använder egenskapen EnableOutputCache .
// Get the current EnabledOutputCache.
Boolean enabledOutputCache =
outputCacheSection.EnableOutputCache;
// Set the EnabledOutputCache.
outputCacheSection.EnableOutputCache = false;
' Get the current EnabledOutputCache.
Dim enabledOutputCache As [Boolean] = _
outputCacheSection.EnableOutputCache
' Set the EnabledOutputCache.
outputCacheSection.EnableOutputCache = False
Kommentarer
Om egenskapen EnableFragmentCache är inställd falsepå cachelagras ingen sida på servern, oavsett inställningarna i @ OutputCache-direktivet eller cachelagringsprofilen som används av sidan. Mer information finns i OutputCacheSettingsSection och OutputCacheProfile.