共用方式為


ASP.NET Caching

One of the most important factors in building high-performance, scalable Web applications is the ability to store items, whether data objects, pages, or parts of a page, in memory the initial time they are requested. You can cache, or store, these items on the Web server or other software in the request stream, such as the proxy server or browser. This allows you to avoid recreating information that satisfied a previous request, particularly information that demands significant processor time or other resources. ASP.NET caching allows you to use a number of techniques to store page output or application data across HTTP requests and reuse it.

ASP.NET provides two types of caching that you can use to create high-performance Web applications. The first is output caching, which allows you to store dynamic page and user control responses on any HTTP 1.1 cache-capable device in the output stream, from the originating server to the requesting browser. On subsequent requests, the page or user control code is not executed; the cached output is used to satisfy the request. The second type of caching is application data caching, which you can use to programmatically store arbitrary objects, such as application data, in server memory so that your application can save the time and resources it takes to recreate them.

In This Section

Reference

  • @ OutputCache
    Details the syntax available for modifying page output cache settings in an ASP.NET page or user control.
  • ASP.NET Performance
    Provides links to topics that describe best practices for developing and monitoring high-performance ASP.NET Web applications.