다음을 통해 공유


SqlCacheDependencySection.Enabled 속성

정의

데이터베이스 테이블에서 변경 내용을 모니터링해야 하는지 여부를 나타내는 값을 가져오거나 설정합니다.

public:
 property bool Enabled { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("enabled", DefaultValue=true)]
public bool Enabled { get; set; }
[<System.Configuration.ConfigurationProperty("enabled", DefaultValue=true)>]
member this.Enabled : bool with get, set
Public Property Enabled As Boolean

속성 값

SQL 캐시 모니터링을 사용하도록 설정하면 이고, 그렇지 않으면 . 기본값은 true입니다.

특성

예제

다음 코드 예제에서는 속성을 사용 하는 방법을 보여 있습니다 Enabled .


// Get the current Enabled property value.
Boolean enabledValue = sqlDs.Enabled;

// Set the Enabled property to false.
sqlDs.Enabled = false;
' Get the current Enabled property value.
Dim enabledValue As [Boolean] = sqlDs.Enabled

' Set the Enabled property to false.
  sqlDs.Enabled = False

설명

ASP.NET 애플리케이션의 캐시에 저장된 항목과 특정 SQL Server 데이터베이스 테이블 간의 관계를 구성한 후 클래스의 인스턴스가 테이블을 모니터링하여 테이블의 SqlCacheDependency 항목이 변경되면 항목이 캐시에서 자동으로 제거되도록 합니다.

이 클래스가 올바르게 작동하려면 데이터베이스와 종속성을 설정하려는 모든 테이블에 알림이 활성화되어 있어야 합니다. 자세한 내용은 클래스에 제공된 SqlCacheDependency 비고를 참조하세요.

메모

활성 SqlCacheDependency 개체가 있는 데이터베이스 테이블의 변경 내용을 모니터링해야 하는지 여부를 나타내는 값을 가져오거나 설정합니다. 이 설정은 행 수준 SqlCacheDependency 개체에 영향을 주지 않습니다.

적용 대상

추가 정보