SystemWebCachingSectionGroup.Cache Propriedade

Definição

Obtém a cache secção contida na configuração.

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

Valor de Propriedade

O objeto CacheSection.

Atributos

Exemplos

O seguinte exemplo de código mostra como obter o CacheSection objeto a partir do ficheiro de configuração de uma aplicação Web existente.


 // Get the <cache> section.
 CacheSection cache =
     cachingSectionGroup.Cache;

 // Display one of its properties.
 msg = String.Format(
 "Cache disable expiration: {0}\n",
 cache.DisableExpiration);

 Console.Write(msg);
' Get the <cache> section.
Dim cache As CacheSection = _
cachingSectionGroup.Cache

' Display one of its properties.
msg = String.Format( _
"Cache disable expiration: {0}" + _
ControlChars.Lf, cache.DisableExpiration)

Console.Write(msg)

Observações

O CacheSection objeto refere-se à cache secção do ficheiro de configuração. Podes usar a CacheSection classe para modificar a cache secção programaticamente.

Aplica-se a

Ver também