OutputCacheSection.EnableFragmentCache 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 do fragmento está ativada.
public:
property bool EnableFragmentCache { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("enableFragmentCache", DefaultValue=true)]
public bool EnableFragmentCache { get; set; }
[<System.Configuration.ConfigurationProperty("enableFragmentCache", DefaultValue=true)>]
member this.EnableFragmentCache : bool with get, set
Public Property EnableFragmentCache As Boolean
Valor de Propriedade
true se a cache de fragmentos estiver ativada; caso contrário, false. A predefinição é true.
- Atributos
Exemplos
O seguinte exemplo de código mostra como usar a EnableFragmentCache propriedade.
// Get the current EnabledFragmentCache.
Boolean enabledFragmentCache =
outputCacheSection.EnableFragmentCache;
// Set the EnabledFragmentCache.
outputCacheSection.EnableFragmentCache = false;
' Get the current EnabledFragmentCache.
Dim enabledFragmentCache As [Boolean] = _
outputCacheSection.EnableFragmentCache
' Set the EnabledFragmentCache.
outputCacheSection.EnableFragmentCache = False
Observações
Se a EnableFragmentCache propriedade estiver definida para false, nenhuma saída de controlo do utilizador é armazenada em cache, independentemente da diretiva @ OutputCache ou do perfil de cache utilizado. Para obter mais informações, consulte OutputCacheSettingsSection e OutputCacheProfile.