By taking often-used data and making it available quickly, you can improve the performance of your application dramatically.
After completing this tutorial, you will be able to
- Improve the performance of your application by using the application cache
- Avoid unnecessary round-trips to the database
- Manage items in the cache
The ASP.NET runtime includes a dictionary (key-value map) of CLR objects. The map (named
Cache) lives with the application and is available via the
System.Web.UI.Page. Using the cache is very much like using the
Session object. You may access items in the cache using an indexer. In addition, you may control the lifetime of objects in the cache and even set up links between the cached objects and their physical data sources. Let's start by examining a case in which using the cache is justified.