As time passes, the information in your data source may change. 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 cached items
Dependencies on files or folders
Dependencies on a database query
You'll see all these types of dependencies in the following section.
To use a cache dependency, you need to create a CacheDependency ...