Chapter 15: Caching Output


Chapter 15

Caching Output

After completing this chapter, you will be able to

  • Cache content

  • Improve the performance of Web applications by using output caching

  • Manage the cached content through the OutputCache directive

  • Manage the cached content through the HttpCachePolicy class

This chapter covers ASP.NET's support for caching output. In Chapter 14, we saw what an impact data caching could make on your application. By avoiding round-trips to the database, you can make parts of your Web site run much faster than they otherwise would. In addition to data caching, ASP.NET supports output caching.

After spending a bit of time watching the whole page-rendering process, you now know it can be pretty involved. A lot happens between the time a page loads and the final closing tag is sent to the browser. For example, the page may require database access. It may have a number of controls declared on it. Furthermore, perhaps some of those controls are the more complex controls like the DataList or the GridView whose rendering process is expensive. All these things usually take time to process.

Just as you can bypass whole round-trips to a database by caching data in memory, you may configure ASP.NET to bypass the whole page-rendering process and send back content that's already been rendered once. This is called output caching.




Microsoft ASP. NET 2.0 Programming Step by Step
Microsoft ASP.NET 2.0 Step By Step (Step By Step (Microsoft))
ISBN: B002KE5VYO
EAN: N/A
Year: 2005
Pages: 177

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net