共用方式為


SqlCacheDependencySection 類別

代表 System.Web.Caching.SqlCacheDependency 組 態區段。

Syntax

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 值。 true 如果啟用 IIS 以接收快取 SQL 資料變更的通知;否則為 false 。 預設值為 true
Location (繼承自 ConfigurationSection .) 索引鍵屬性。
Path (繼承自 ConfigurationSection .) 索引鍵屬性。
PollTime sint32 ,表示查詢 SQL 資料庫對快取資料所做的變更的頻率,以毫秒為單位。 預設值為 60000。 這個屬性不能設定為小於 500。
SectionInformation (繼承自 ConfigurationSection。)

子類別

這個類別不包含子類別。

備註

這個類別可讓儲存在 ASP.NET 應用程式System.Web.Cacheing.Cache物件中的資料在對資料表或查詢) 進行變更時更新其SQL Server (資料來源。 當資料庫資料表或查詢變更時,會自動刪除快取的專案,並將新版的專案新增至 ASP.NET 快取。

繼承階層架構

ConfigurationSection

ConfigurationSectionWithCollection

SqlCacheDependencySection

規格需求

類型 描述
Client - Windows Vista 上的 IIS 7.0
- Windows 7 上的 IIS 7.5
- Windows 8 上的 IIS 8.0
- Windows 10上的 IIS 10.0
伺服器 - Windows Server 2008 上的 IIS 7.0
- Windows Server 2008 R2 上的 IIS 7.5
- Windows Server 2012 上的 IIS 8.0
- Windows Server 2012 R2 上的 IIS 8.5
- Windows Server 2016上的 IIS 10.0
產品 - IIS 7.0、IIS 7.5、IIS 8.0、IIS 8.5、IIS 10.0
MOF 檔案 WebAdministration.mof

另請參閱

System.Web.Cacheing.SqlCacheDependencySystem.Web.Cacheing.CacheConfigurationSectionWithCollection 類別
SqlCacheDependencyDatabase 類別
SqlCacheDependencyDatabaseSettings 類別