OutputCacheProfile.SqlDependency 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定該 SqlDependency 屬性。
public:
property System::String ^ SqlDependency { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("sqlDependency")]
public string SqlDependency { get; set; }
[<System.Configuration.ConfigurationProperty("sqlDependency")>]
member this.SqlDependency : string with get, set
Public Property SqlDependency As String
屬性值
- 屬性
範例
以下程式碼範例說明如何使用該 SqlDependency 屬性。
// Get the current SqlDependency.
String sqlDependencyValue =
outputCacheProfile.SqlDependency;
// Set the SqlDependency.
outputCacheProfile.SqlDependency =
string.Empty;
' Get the current SqlDependency.
Dim sqlDependencyValue As String = _
outputCacheProfile.SqlDependency
' Set the SqlDependency.
outputCacheProfile.SqlDependency = _
String.Empty
備註
定義 SqlDependency 了網頁應用程式與 SQL Server 實例之間的關係,允許偵測伺服器資料變更。 它 SqlDependency 確保當它們依賴的 SQL 資料表變更時,輸出快取頁面會從快取中移除。
Note
類別 SqlCacheDependency 會監控資料表,當資料表變更時,該項目會自動從快取中移除。 此類別無法獲得繼承。