O'Reilly logo

ASP.NET MVC 2 Cookbook by Richard Kimber, Andrew Siemer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using output caching to cache an entire page

In this very short recipe, we are going to see how to use output caching. Output caching is a very easy way to implement caching for an entire page in your application. The difference between setting output caching on a view and caching items from the database is that you are caching at a higher level of processing. The reason to cache data access is to remove the cost of communicating with the server and then running a complex, possibly long-running query. Working with cached data will certainly save you some time on getting your requests turned around. However, output caching caches not only the data access, but also the processing of that data into a view. With output caching, you are caching the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required