Reputation: 2966
how to detect sql data changes to refresh cache data?i have cache algorith . i know caching . But i want to need some special usage to detect any changes in sql. How to make it below?BUT I NEED some advice and performance
Upvotes: 0
Views: 2728
Reputation: 8920
You can use the the SqlCacheDependency Class.
ASP.NET allows you to use the SqlCacheDependency class to create a cache item dependency on a table or row in a database. When a change occurs in the table or in a specific row, the item that has a dependency is invalidated and removed from the cache. http://msdn.microsoft.com/en-us/library/ms178604.aspx
Upvotes: 2