Summary

In this chapter, we learned how to use caching to trade memory usage for a reduction in the time taken to generate a page.

We first saw how to ask browsers and proxies to cache our pages and how they provide a (limited) free lunch by providing cache memory that's not only free to us, but close to the visitor as well. While discussing proxy caching, we learned about some security issues and saw that proxy caching doesn't mix with query strings and setting cookies.

Then we looked at output caching, where entire pages or parts of pages are cached on the web server. We saw how to cache different versions of each page based on query string parameters, HTTP headers, or even custom variables. Fragment caching and post-cache substitution were discussed ...

Get ASP.NET Site Performance Secrets now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.