OutputCacheSection.EnableOutputCache Propiedad
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Obtiene o establece un valor que indica si la memoria caché de salida está habilitada.
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
true si la caché de salida está habilitada; de lo contrario, false. El valor predeterminado es true.
- Atributos
Ejemplos
En el ejemplo de código siguiente se muestra cómo usar la EnableOutputCache propiedad .
// 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 está establecida falseen , no se almacena en caché ninguna página en el servidor, independientemente de la configuración de @ Directiva OutputCache o perfil de almacenamiento en caché usado por la página. Para obtener más información, vea OutputCacheSettingsSection y OutputCacheProfile.