通过


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 轮询数据库中链接到缓存项的表更改的时间频率。

注意可以在配置部分元素sqlCacheDependencycache的数据库databases级别上重写频率。

适用于

另请参阅