SqlCacheDependencySection 类

表示 System.Web.Caching.SqlCacheDependency 配置节。

语法

class SqlCacheDependencySection : ConfigurationSectionWithCollection  

方法

下表列出了 SqlCacheDependencySection 类公开的方法。

名称 说明
添加 (继承自 ConfigurationSectionWithCollection。)
清除 (从 ConfigurationSectionWithCollection 继承。)
Get (从 ConfigurationSectionWithCollection 继承。)
GetAllowDefinition (继承自 ConfigurationSection。)
GetAllowLocation (从 ConfigurationSection 继承。)
删除 (从 ConfigurationSectionWithCollection 继承。)
RevertToParent (从 ConfigurationSection 继承。)
SetAllowDefinition (从 ConfigurationSection 继承。)
SetAllowLocation (从 ConfigurationSection 继承。)

属性

下表列出了 SqlCacheDependencySection 类公开的属性。

名称 描述
Databases 一个 SqlCacheDependencyDatabaseSettings 值,其中包含在 ASP.NET 缓存中缓存的 SQL 数据的配置设置。
Enabled 一个 boolean 值。 如果启用了 IIS 来接收对缓存的 SQL 数据所做的更改的通知,则为 true,否则为 false。 默认为 true
Location (继承自 ConfigurationSection。)一个键属性。
Path (继承自 ConfigurationSection。)一个键属性。
PollTime 一个 sint32 值,该值表示频率(以毫秒为单位),即多久查询 SQL 数据库一次以查找对缓存的数据所做的更改。 默认值为 60000。 此属性不能设置为小于 500。
SectionInformation (从 ConfigurationSection 继承。)

子类

此类不包含子类。

注解

此类允许更新 ASP.NET 应用程序 System.Web.Caching.Cache 对象中存储的数据(在对其 SQL Server 数据源(表或查询)进行更改时这样做)。 当数据库表或查询发生更改时,缓存项会被自动删除,该项的新版本会添加到 ASP.NET 缓存中。

继承层次结构

ConfigurationSection

ConfigurationSectionWithCollection

SqlCacheDependencySection

要求

类型 描述
客户端 - IIS 7.0(在 Windows Vista 上)
- IIS 7.5(在 Windows 7 上)
- IIS 8.0(在 Windows 8 上)
- IIS 10.0(在 Windows 10 上)
服务器 - IIS 7.0(在 Windows Server 2008 上)
- IIS 7.5(在 Windows Server 2008 R2 上)
- IIS 8.0(在 Windows Server 2012 上)
- IIS 8.5(在 Windows Server 2012 R2 上)
- IIS 10.0(在 Windows Server 2016 上)
产品 - IIS 7.0、IIS 7.5、IIS 8.0、IIS 8.5、IIS 10.0
MOF 文件 WebAdministration.mof

另请参阅

System.Web.Caching.SqlCacheDependencySystem.Web.Caching.CacheConfigurationSectionWithCollection 类
SqlCacheDependencyDatabase 类
SqlCacheDependencyDatabaseSettings 类