Compartir vía


HttpRuntimeSection.EnableKernelOutputCache Propiedad

Definición

Obtiene o establece un valor que indica si el almacenamiento en caché de salida está habilitado.

public:
 property bool EnableKernelOutputCache { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("enableKernelOutputCache", DefaultValue=true)]
public bool EnableKernelOutputCache { get; set; }
[<System.Configuration.ConfigurationProperty("enableKernelOutputCache", DefaultValue=true)>]
member this.EnableKernelOutputCache : bool with get, set
Public Property EnableKernelOutputCache As Boolean

Valor de propiedad

true si el almacenamiento en caché de salida está habilitado; de lo contrario, false. El valor predeterminado es true.

Atributos

Ejemplos

En el ejemplo siguiente se muestra cómo usar la EnableKernelOutputCache propiedad .

// Get the current EnableKernelOutputCache property value.
Response.Write("EnableKernelOutputCache: " +
  configSection.EnableKernelOutputCache + "<br>");

// Set the EnableKernelOutputCache property to true.
configSection.EnableKernelOutputCache = true;
' Get the current EnableKernelOutputCache property value.
Response.Write("EnableKernelOutputCache: " & _
  configSection.EnableKernelOutputCache & "<br>")

' Set the EnableKernelOutputCache property to true.
configSection.EnableKernelOutputCache = True

Comentarios

Para almacenar en caché una respuesta, es necesario cumplir los siguientes criterios:

  • El almacenamiento en caché debe habilitarse explícitamente mediante una directiva de página o mediante la API de almacenamiento en caché.

  • El almacenamiento en caché debe tener una directiva de expiración para que el kernel sepa cuándo se debe descartar.

  • El almacenamiento en caché no puede tener ningún encabezado o parámetro variable.

  • La solicitud no debe requerir ninguna autenticación.

Nota:

Esta propiedad solo es relevante cuando se instala Internet Information Services (IIS) versión 6.0 o posterior.

Se aplica a

Consulte también