SqlCacheDependencySection.PollTime 属性

定义

获取或设置 SqlCacheDependency 轮询数据库表更改情况的频率。Gets or sets the frequency with which the SqlCacheDependency polls the database table for changes.

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

属性值

Int32

SQL 缓存依赖项的轮询时间(以毫秒为单位)。The SQL cache dependency polling time, in milliseconds. 默认值为 500。The default is 500.

属性

示例

下面的代码示例说明如何使用 PollTime 属性。The following code example shows how to use the PollTime property.


// 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 会轮询数据库以查找链接到缓存项的表中的更改。The PollTime property defines the time frequency with which ASP.NET polls the database for changes in the table linked to the cached item.

注意 可以在 "配置" 部分的的元素中的数据库级别重写频率 databases sqlCacheDependency cacheNote The frequency can be overridden on a database level in the databases element of the sqlCacheDependency in the cache configuration section.

适用于

另请参阅