Q: Output caching _ViewStart.cshtml and _Layout.cshtml in MVC 3 I am trying to cache the MVC 3 _ViewStart and _Layout pages, am I right in thinking these are not cached by default? The problem is the VS bult in web server or IIS should be caching my images in these site master pages but it seems to be loading them everytime.
I can put OutputCache attributes on controller but I can't on these pages above as they have no controllers. Is it possible?

A: _ViewStart and _Layout are only composing elements of the final markup. So by using the [OutputCache] attribute on some controller action you are caching the entire generated HTML from this action, including the view, and you are in fact caching those elements as well.
Unfortunately ASP.NET MVC 3 doesn't support Donut Caching. It supports only Donut Hole Caching. I guess this is something that is going to be improved and added support to in future versions.
