Bagikan melalui


SqlCacheDependencyDatabase.PollTime Properti

Definisi

Mendapatkan atau mengatur frekuensi polling SqlCacheDependency tabel database untuk perubahan.

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

Nilai Properti

Waktu polling database, dalam milidetik.

Atribut

Contoh

Contoh kode berikut menunjukkan cara menggunakan PollTime properti .


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

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

' Set the PollTime property to 1000 milliseconds.
sqlCdd.PollTime = 1000

Keterangan

Properti PollTime ini memungkinkan Anda untuk secara terprogram mengakses dan memodifikasi pollTime atribut add elemen databases simpul dalam file konfigurasi.

Setelah Anda mengonfigurasi hubungan antara item yang disimpan dalam cache aplikasi ASP.NET dan tabel database SQL Server tertentu, instans SqlCacheDependency kelas memantau tabel sehingga ketika item dalam tabel berubah, item secara otomatis diperbarui atau dihapus dari cache. Pemantauan terjadi pada frekuensi yang ditentukan oleh PollTime.

Berlaku untuk

Lihat juga