User Id :    Password :      New Member   Forgot Password  
Topic: What is SQL Cache Dependency in ASP.NET 2.0
Sachin Jain
29 Oct 2010 at 11:33 PM
What is SQL Cache Dependency in ASP.NET 2.0.
Re: What is SQL Cache Dependency in ASP.NET 2.0
01 Nov 2010 at 12:07 AM

The data source may change in response to other actions. However, if your code uses caching, you may remain unaware of the changes and continue using out-of-date information from the cache. To help mitigate this problem, ASP.NET supports cache dependencies. Cache dependencies allow you to make a cached item dependent on another resource so that when that resource changes the cached item is removed automatically. ASP.NET includes three types of dependencies:

  • Dependencies on other cache items.
  • Dependencies on files or folders.
  • Dependencies on a database query.

SQL cache dependencies is new technique in ASP.NET 2.0 which can automatically invalidate a cached data object just like a Dataset. when the related data is modified in the database. So for instance if you have a dataset which is tied up to a database tables any changes in the database table will invalidate the cached data object which can be a dataset or a data source.To enable this we need a syntax that is as follows:- aspnet_regsql -ed -E -d Northwind

Total Replies: 1
Featured Text Ad

Featured Ad