Condividi tramite


SystemWebCachingSectionGroup.Cache Proprietà

Definizione

Ottiene la sezione cache contenuta all'interno della configurazione.

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

Valore della proprietà

CacheSection

Oggetto CacheSection.

Attributi

Esempio

Nell'esempio di codice seguente viene illustrato come ottenere l'oggetto CacheSection dal file di configurazione di un'applicazione Web esistente.


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

Commenti

L'oggetto CacheSection fa riferimento alla sezione cache del file di configurazione. È possibile usare la CacheSection classe per modificare la cache sezione a livello di codice.

Si applica a

Vedi anche