SystemWebCachingSectionGroup.Cache 屬性

定義

取得 cache 配置中包含的該區段。

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

屬性值

CacheSection 物件。

屬性

範例

以下程式碼範例說明如何從現有網頁應用程式的設定檔取得該 CacheSection 物件。


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

備註

物件 CacheSection 指的是設定檔的該 cache 區段。 你可以用這個 CacheSection 類別程式化修改該 cache 區段。

適用於

另請參閱