The following article demonstrates how to use SQL Cache Dependency with SQL Server 2005/2008, ASP.NET 3.5 and Extension Methods.
ASP.NET has several different varieties of caching features. This article will shine a light on a little known feature of ASP.NET 3.5 called SQL Cache Dependency. SQL Cache Dependency has been around since SQL Server 2000, but back then ASP.NET was limited as far as it had a polling mechanism built in so it would continually poll the database for changes, and when a change was found, it was up to the developer to notify the website that a change had occurred and make the necessary changes in the cache.
With the release of SQL Server 2005 and 2008, ASP.NET has a more mature way to perform SQL Cache Dependency. The developer can now tell SQL Server to push notifications when data has changed. The biggest factor here is that the website does not have to continually poll the database.
Hope this will help
Jay Ganesh
I need to develop an application that sends notifications to an external client on changes in our database. Would SQL cache dependency be my best option? Is this a better option than polling?
Hi Chaz, Absolutely SQL Dependency will help and its more convenient way. you can find more information on this topic from following link:
http://www.codeproject.com/Articles/12335/Using-SqlDependency-for-data-change-events
Hope this help !!!
Sandeep
Thank you for this, I’ll have a read through it now!