OutputCacheSection.EnableOutputCache Vlastnost
Definice
Důležité
Některé informace platí pro předběžně vydaný produkt, který se může zásadně změnit, než ho výrobce nebo autor vydá. Microsoft neposkytuje žádné záruky, výslovné ani předpokládané, týkající se zde uváděných informací.
Získá nebo nastaví hodnotu určující, zda je výstupní mezipaměť povolena.
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
Hodnota vlastnosti
truepokud je povolená výstupní mezipaměť; v opačném případě . false Výchozí hodnota je true.
- Atributy
Příklady
Následující příklad kódu ukazuje, jak použít EnableOutputCache vlastnost.
// 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
Poznámky
Pokud je vlastnost nastavena EnableFragmentCache na false, žádná stránka není uložena v mezipaměti na serveru, bez ohledu na nastavení v direktivě @ OutputCache nebo ukládání do mezipaměti profilu používaného stránkou. Pro více informací se podívejte na OutputCacheSettingsSection a OutputCacheProfile.