I am using SqlCacheDependency with polling in an ASP.NET project.
Sometimes, I need to disable SqlCacheDependency, which I do as follows:
<caching>
<sqlCacheDependency enabled="false" pollTime="10000">
<databases>
<!-- ... -->
</databases>
</sqlCacheDependency>
</caching>
However, this causes an error in my code when I do a HttpRuntime.Cache.Insert() with the SQL dependency.
To enable SQL cache dependency, please set the 'enabled' attribute to "true" in the section in the configuration file.
Is there a way I can programmatically check if this setting is enabled?