OutputCacheSection.EnableOutputCache Własność
Definicja
Ważny
Niektóre informacje dotyczą produktów przedpremierowych, które mogą zostać znacznie zmodyfikowane przed premierą. Microsoft nie udziela żadnych gwarancji, ani wyraźnych, ani domniemanych, dotyczących informacji podanych tutaj.
Pobiera lub ustawia wartość wskazującą, czy pamięć podręczna danych wyjściowych jest włączona.
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
Wartość nieruchomości
true jeśli pamięć podręczna danych wyjściowych jest włączona; w przeciwnym razie , false. Wartość domyślna to true.
- Atrybuty
Przykłady
W poniższym przykładzie kodu pokazano, jak używać EnableOutputCache właściwości.
// 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
Uwagi
EnableFragmentCache Jeśli właściwość jest ustawiona na falsewartość , żadna strona nie jest buforowana na serwerze, niezależnie od ustawień dyrektywy @ OutputCache lub profilu buforowania używanego przez stronę. Aby uzyskać więcej informacji, zobacz OutputCacheSettingsSection i OutputCacheProfile.