ASp.NET 2.0 offers developers the chance to use some new implementations of cache dependencies
Cached objects such as a Dataview or Dataset are now automatically
marked as invalid when the there is a change in the state of the database holding the data the control originally read from the database.
Your controls Cache can be dependent on
A) Other Caches
B) Files or folders
C) Database queries
For SQL Server 2000 once Cache notifications are enabled e.g.
(aspnet_regsql -ed -E -d YourDatabseName)
MSDN background
Running the command line above causes the database to create a new table and some stored procedures which together
manage the monitoring of any changes in tables you want to make you Caches dependent upon.
For example
exec AspNet_SqlCacheRegisterTableStoredProcedure 'TableName'
will mean any changes in the TableName are recorded in the newly created table which in turn notifies ASP.NET to invalidate the Cache which was dependent on 'TableName'.
In order for ASP.NET to know it has Caches that are dependent on changes in SQL server tables you need to tell it by adding the
element to the web.config ( within the <system.web> tags).