Share via


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 指令可以替代 包含的所有设置OutputCacheProfile,但 属性除外Enabled。 这是为了确保可以启用或禁用 , OutputCacheProfile 而无需修改可能已重写它的所有页面中的 指令。

适用于

另请参阅