OutputCacheSection.EnableOutputCache Propiedad

Definición

Obtiene o establece un valor que indica si está habilitada la caché de resultados.

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 propiedad

Boolean

Es true si la caché de resultados está habilitada; en caso contrario, es false. De manera predeterminada, es true.

Atributos

Ejemplos

En el ejemplo de código siguiente se muestra cómo utilizar la propiedad EnableOutputCache.


// 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

Comentarios

Si la EnableFragmentCache propiedad se establece falseen , no se almacena en caché ninguna página en el servidor, independientemente de la configuración de la directiva @ OutputCache o del perfil de almacenamiento en caché usado por la página. Para obtener más información, vea OutputCacheSettingsSection y OutputCacheProfile.

Se aplica a

Consulte también