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 物件的 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 而不需要修改可能已覆寫的所有頁面中的 指示詞。
適用於
另請參閱
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應