| ||||||||||||||||||||||||||||||||||||
<caching> sqlCacheDependency ElementASP.NET Syntax ASP.NET Configuration Sections Defines the settings used by the system.web Element (ASP.NET Settings Schema) caching Element (ASP.NET Settings Schema) sqlCacheDependency Element for caching (ASP.NET Settings Schema)
| ||||||||||||||||||||||||||||||||||||
| Attribute | Description |
|---|---|
|
enabled |
Required Boolean attribute. Indicates whether or not changes are being polled for. |
|
pollTime |
Optional Int32 attribute. Sets the frequency with which the Default value is 1 minute. |
| Element | Description |
|---|---|
|
databases |
Optional element. Contains one or more named SQL connections that can be used by the SqlCacheDependency. |
| Element | Description |
|---|---|
|
configuration |
The required root element in every configuration file used by the common language runtime and .NET Framework applications. |
|
system.web |
Specifies the root element for the ASP.NET configuration settings in a configuration file. Contains configuration elements that configure ASP.NET Web applications and control how the applications behave. |
|
caching |
Configures the cache settings for a Web application. |
Remarks
Default ConfigurationThe following default sqlCacheDependency element is not explicitly configured in the machine configuration file or in the root Web.config file, but is the default configuration returned by application in the .NET Framework version 2.0.
Copy Code | |
|---|---|
<sqlCacheDependency enabled = "true"
pollTime = "60000">
<databases>
<add name = ""
connectionStringName = ""
pollTime = "60000"/>
</databases>
</sqlCacheDependency> | |
ExampleThe following example adds a SqlCacheDependency object to an ASP.NET application.
Copy Code | |
|---|---|
<sqlCacheDependency enabled="true" pollTime="30000">
<databases>
<add name="Pubs" connectionStringName="PubsConn" />
</databases>
</sqlCacheDependency> | |
The following default sqlCacheDependency element is not explicitly configured in the machine configuration file or in the root Web.config file, but is the default configuration returned by application in the .NET Framework version 2.0.
Copy Code | |
|---|---|
<sqlCacheDependency enabled = "true"
pollTime = "60000">
<databases>
<add name = ""
connectionStringName = ""
pollTime = "60000"/>
</databases>
</sqlCacheDependency> | |
ExampleThe following example adds a SqlCacheDependency object to an ASP.NET application.
Copy Code | |
|---|---|
<sqlCacheDependency enabled="true" pollTime="30000">
<databases>
<add name="Pubs" connectionStringName="PubsConn" />
</databases>
</sqlCacheDependency> | |