Home > ASP.NET Applications > ASP.NET Optimization > ASP.NET Caching Features
ASP.NET Web Applications
When clients access an ASP.NET page, there are basically two ways to provide them with the information they need:
- the ASP.NET page can either obtain information from server resources, such as from data that has been persisted to a database, or
- the ASP.NET page can obtain information from within the application.
Retrieving information from a resource outside the application will require more processing steps, and will therefore require more time and resources on the server than if the information can be obtained from within the application space.
If the information that will be sent to the browser has already been prepared by a previous request, the application will be able to retrieve that information faster if it has been stored in memory, somewhere along the request/response stream.
Known as caching, this technique can be used to temporarily store page output or application data either on the client or on the server, which can then be re-used to satisfy subsequent requests and thus avoid the overhead of re-creating the same information.
Caching is particularly suitable when you expect to return the same information in the same format for many different requests.
ASP.NET provides the following types of caching that can be used to build highly responsive Web applications:
- Output caching, which caches the dynamic response generated by a request.
- Fragment caching, which caches portions of a response generated by a request.
- Data caching, which allows developers to programmatically retain arbitrary data across requests.
- Caching ASP.NET Pages
- Describes the required modifications to a page to take advantage of page output caching.
- Caching Portions of an ASP.NET Page
- Discusses the techniques to cache regions of a page using the @ OutputCache directive and user controls. Useful if you do not want to cache an entire page.
- Caching Application Data
- Outlines the concepts behind using the ASP.NET application cache and provides samples of how to use the classes, methods, and properties that allow you to manipulate it.
- Setting the Output Cache Location
- Describes how to set the page output to be cached on the requesting client, the responding server, or a proxy server through which the response passes.
- @ OutputCache
- Details the syntax available to you, as a page developer, for modifying page output cache settings in an ASP.NET page or user control.
- ASP.NET Optimization
- Describes the best practices for developing high-performance ASP.NET Web applications. It includes an overview of tools that you can use to test and monitor your application’s performance. It also includes a list of performance counters that ship with ASP.NET.