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
属性值
对象的OutputCacheProfile一个OutputCacheProfileCollection。
- 属性
示例
下面的代码示例演示如何使用该 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 该命令,而无需修改可能已重写它的所有页面中的指令。