OutputCacheSettingsSection.OutputCacheProfiles 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
public:
property System::Web::Configuration::OutputCacheProfileCollection ^ OutputCacheProfiles { System::Web::Configuration::OutputCacheProfileCollection ^ get(); };
[System.Configuration.ConfigurationProperty("outputCacheProfiles")]
public System.Web.Configuration.OutputCacheProfileCollection OutputCacheProfiles { get; }
[<System.Configuration.ConfigurationProperty("outputCacheProfiles")>]
member this.OutputCacheProfiles : System.Web.Configuration.OutputCacheProfileCollection
Public ReadOnly Property OutputCacheProfiles As OutputCacheProfileCollection
屬性值
OutputCacheProfileCollection A。OutputCacheProfile
- 屬性
範例
以下程式碼範例說明如何使用該 OutputCacheProfiles 屬性。
// Get the current OutputCacheProfiles property value.
OutputCacheProfileCollection outputCacheProfilesValue =
outputCacheSettings.OutputCacheProfiles;
' Get the current OutputCacheProfiles property value.
Dim outputCacheProfilesValue _
As OutputCacheProfileCollection = _
outputCacheSettings.OutputCacheProfiles
備註
這個 OutputCacheProfiles 屬性允許你在設定檔中以程式方式存取該 outputCacheProfiles 元素。 你可以用這個 OutputCacheProfiles 屬性來程式化修改這個 outputCacheProfiles 元素。
該 outputCacheProfiles 區段包含 OutputCacheProfile 代表輸出快取設定的物件,這些設定可被應用程式中的頁面使用。 這些設定可透過設定 CacheProfile@ OutputCache 指令的屬性來套用於頁面。 套用該設定檔來控制快取屬性,如相依性、快取位置及快取過期時間。
@ OutputCache 指令可以覆蓋 中OutputCacheProfile所有的設定,唯獨 該Enabled屬性除外。 這是為了確保你可以啟用或停用 , OutputCacheProfile 而不必修改所有可能覆蓋該指令的頁面指令。