Adding Items with Dependencies
When you add an item to the Cache
object, you can make the item dependent on an external object. If the external object is modified, the item is automatically dropped from the cache.
The ASP.NET Framework includes three cache dependency classes:
• CacheDependency
—
Enables you to create a dependency on a file or other cache key.
• SqlCacheDependency
—
Enables you to create a dependency on a Microsoft SQL Server database table or the result of a SQL Server 2005 query.
• AggregateCacheDependency
—
Enables you to create a dependency using multiple CacheDependency
objects. For example, you can combine file and SQL dependencies with this object.
The CacheDependency
class is the base class. The other two classes derive from ...
Get ASP.NET 4 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.