SystemWebCachingSectionGroup.OutputCacheSettings Propiedad

Definición

Obtiene la outputCacheSettings sección contenida en la configuración.

public:
 property System::Web::Configuration::OutputCacheSettingsSection ^ OutputCacheSettings { System::Web::Configuration::OutputCacheSettingsSection ^ get(); };
[System.Configuration.ConfigurationProperty("outputCacheSettings")]
public System.Web.Configuration.OutputCacheSettingsSection OutputCacheSettings { get; }
[<System.Configuration.ConfigurationProperty("outputCacheSettings")>]
member this.OutputCacheSettings : System.Web.Configuration.OutputCacheSettingsSection
Public ReadOnly Property OutputCacheSettings As OutputCacheSettingsSection

Valor de propiedad

Objeto OutputCacheSettingsSection.

Atributos

Ejemplos

En el ejemplo de código siguiente se muestra cómo obtener el OutputCacheSettingsSection objeto del archivo de configuración de una aplicación web existente.


// Get the .<outputCacheSettings> section
OutputCacheSettingsSection outputCacheSettings=
    cachingSectionGroup.OutputCacheSettings;

// Display the number of existing 
// profiles.
int profilesCount = 
    outputCacheSettings.OutputCacheProfiles.Count;
msg = String.Format(
"Number of profiles: {0}\n",
profilesCount.ToString());

Console.Write(msg);
' Get the .<outputCacheSettings> section
Dim outputCacheSettings _
As OutputCacheSettingsSection = _
cachingSectionGroup.OutputCacheSettings

' Display the number of existing 
' profiles.
Dim profilesCount As Integer = _
outputCacheSettings.OutputCacheProfiles.Count
msg = String.Format( _
"Number of profiles: {0}" + _
ControlChars.Lf, profilesCount.ToString())

Console.Write(msg)

Comentarios

El OutputCacheSettingsSection objeto hace referencia a la outputCacheSettings sección del archivo de configuración.

La configuración de caché de salida habilita o deshabilita la caché de salida persistente basada en disco, define la ubicación para conservar los datos que se van a almacenar en caché y especifica el tamaño máximo de la caché por aplicación.

ASP.NET permite almacenar en caché varias versiones de una respuesta de página mediante declaración mediante atributos de la directiva /> de .

Puede lograr los mismos resultados configurando la aplicación mediante el OutputCacheSettingsSection tipo o OutputCacheProfile .

Se aplica a

Consulte también