OutputCacheSettingsSection.OutputCacheProfiles 屬性

定義

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 而不必修改所有可能覆蓋該指令的頁面指令。

適用於

另請參閱