共用方式為


SqlCacheDependencySection.PollTime 屬性

定義

取得或設定輪詢資料庫資料表變更的頻率 SqlCacheDependency

public:
 property int PollTime { int get(); void set(int value); };
[System.Configuration.ConfigurationProperty("pollTime", DefaultValue=60000)]
public int PollTime { get; set; }
[<System.Configuration.ConfigurationProperty("pollTime", DefaultValue=60000)>]
member this.PollTime : int with get, set
Public Property PollTime As Integer

屬性值

SQL 快取依賴輪詢時間,以毫秒計。 預設值為 500。

屬性

範例

以下程式碼範例說明如何使用該 PollTime 屬性。


// Get the current PollTime property value.
Int32 pollTimeValue = sqlDs.PollTime;

// Set the PollTime property to 500 milliseconds.
sqlDs.PollTime = 500;
' Get the current PollTime property value.
Dim pollTimeValue As Int32 = sqlDs.PollTime

' Set the PollTime property to 500 milliseconds.
sqlDs.PollTime = 500

備註

PollTime 屬性定義了 ASP.NET 輪詢資料庫中與快取項目連結的表格變更的時間頻率。

頻率可以在資料庫層級 databasessqlCacheDependencycache 的設定區塊中被覆寫。

適用於

另請參閱