OutputCacheSection.EnableFragmentCache Propriedade

Definição

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.

Aplica-se a

Ver também