
515
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
Chapter 24Caching Namespace
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.
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.
Figure 24-1. The System.Web.Caching namespace
implementsextends
KEY
System System.Web.Caching
Abstract ClassClass Interface
Sealed
Cache
CacheDependency
CacheItemRemovedCallback
Object
IEnumerable
MulticastDelegate
IDisposable