Programming Microsoft ASP.NET 2.0 Core Reference
Overview
Caching is the system's or the application's ability to save frequently used data to an intermediate storage medium. An intermediate storage medium is any support placed between the application and its primary data source that lets you persist and retrieve data more quickly than with the primary data source. In a typical Web scenario, the canonical intermediate storage medium is the Web server's memory, whereas the data source is the back-end data-management system. Obviously, you can design caching around the requirements and characteristics of each application, thus using as many layers of caching as needed to reach your performance goals.
In ASP.NET, caching comes in two independent but not exclusive flavors caching application data, and caching the output of served pages. Page-output caching is the quickest way to take advantage of cache capabilities. You don't need to write code; you just configure it at design time and go. For pages that don't get stale quickly (and also for pages that reclaim "live" data), page-output caching is a kind of free performance booster. To build an application-specific caching subsystem, you use the caching API that lets you store data into a global, system-managed object the Cache object. This approach gives you the greatest flexibility, but you need to learn a few usage patterns to stay on the safe side. Let's tackle application data first.