Chapter 24. The System.Web.Caching Namespace

The System.Web.Caching namespace includes types used for ASP.NET data caching. The Cache class is the focal point of this namespace; it contains a collection of cached objects and allows you to set expiration policies and dependencies for each item in the cache. The CacheDependency class encapsulates a cache dependency and allows you to link the validity of a cache item to another item or a file on the web server. The CacheItemRemovedCallback delegate allows you to respond when an object is dropped from the cache. Both types work in conjunction with the Cache class. Together, they allow you to implement sophisticated data caching. Figure 24-1 shows the types in this namespace.

Figure 24-1. The System.Web.Caching namespace
figs/anet2_2401.gif

ASP.NET also supports page caching, which stores entire compiled pages for automatic reuse. To configure settings for page caching, you must use the System.Web.HttpCachePolicy class.



    Part I: Introduction to ASP.NET
    Part III: Namespace Reference
    Chapter 40. The System.Web.UI.MobileControls Namespace
    Chapter 42. The System.Web.UI.WebControls Namespace