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 物件的 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指示詞可以覆寫 屬性以外的 Enabled 所有設定 OutputCacheProfile 。 這是為了確保您可以啟用或停用 , OutputCacheProfile 而不需要修改可能已覆寫的所有頁面中的 指示詞。

適用於

另請參閱