OutputCacheSection.EnableFragmentCache Propriedade

Definição

Obtém ou define um valor que indica se o cache do fragmento está habilitado.

[System.Configuration.ConfigurationProperty("enableFragmentCache", DefaultValue=true)]
public bool EnableFragmentCache { get; set; }

Valor da propriedade

true se o cache de fragmentos estiver habilitado; caso contrário, false. O padrão é true.

Atributos

Exemplos

O exemplo de código a seguir mostra como usar a EnableFragmentCache propriedade .


// Get the current EnabledFragmentCache.
Boolean enabledFragmentCache =
    outputCacheSection.EnableFragmentCache;

// Set the EnabledFragmentCache.
outputCacheSection.EnableFragmentCache = false;

Comentários

Se a EnableFragmentCache propriedade estiver definida como false, nenhuma saída de controle de usuário será armazenada em cache, independentemente da diretiva @ OutputCache ou do perfil de cache usado. Para obter mais informações, consulte OutputCacheSettingsSection e OutputCacheProfile.

Aplica-se a

Produto Versões
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

Confira também