OutputCacheSection.EnableOutputCache Propriedade
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Recebe ou define um valor que indica se a cache de saída está ativada.
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
Valor de Propriedade
true se a cache de saída estiver ativada; caso contrário, false. A predefinição é true.
- Atributos
Exemplos
O seguinte exemplo de código mostra como usar a EnableOutputCache propriedade.
// 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
Observações
Se a EnableFragmentCache propriedade estiver definida para false, nenhuma página é armazenada em cache no servidor, independentemente das definições na diretiva @ OutputCache ou do perfil de cache usado pela página. Para obter mais informações, consulte OutputCacheSettingsSection e OutputCacheProfile.