Bahasa

SystemWebCachingSectionGroup.Cache Properti

Definisi

Mendapatkan bagian yang cache terkandung dalam konfigurasi.

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

Nilai Properti

Objek CacheSection.

Atribut

Contoh

Contoh kode berikut menunjukkan cara mendapatkan CacheSection objek dari file konfigurasi aplikasi Web yang ada.


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

Keterangan

Objek CacheSection mengacu pada bagian cache file konfigurasi. Anda dapat menggunakan CacheSection kelas untuk memodifikasi bagian cache secara terprogram.

Berlaku untuk

Lihat juga