Is there a possibility to do Donut Caching with MVC2? Even with a lot of research I was not able to find a working solution.
4 Answers
Donut caching does not work with ASP.NET MVC 2, see http://forums.asp.net/t/1521502.aspx :
Supporting donut caching would require view engines to be able to send an array consisting of literal text + callbacks to the writer. This is a major plumbing change and is not something that will be included in v2 of the product.

- 113,561
- 39
- 200
- 288
Not Supported != Not Possible
http://www.klopfenstein.net/lorenz.aspx/output-donut-caching-attribute-asp-net-mvc-partial-requests
http://haacked.com/archive/2009/05/12/donut-hole-caching.aspx

- 24,673
- 10
- 77
- 110
-
Those links are all for MVC1.0. Substitution was removed from MVC2.0 – Cheburek Dec 11 '10 at 19:40
Cross-post from another question:
Donut Caching (yes, the real thing) is available as part of my 'speed-lib' for MVC: Moth. Works in both ASP.NET MVC 2 and MVC 3.
Docs are at the wiki, and examples are in the Mvc3.Demo folder.

- 1
- 1

- 26,598
- 9
- 83
- 120
-
Be careful when posting copy and paste boilerplate/verbatim answers to multiple questions, these tend to be flagged as "spammy" by the community. – Kev Aug 09 '11 at 10:59
I think this may be useful. It is possible using Html.Action and passing HttpContextBase instance to the child controller. Check it http://eliasbland.wordpress.com/2010/04/08/donut-caching-in-asp-net-mvc-2-with-html-action/
but I don't know if it works properly so far...

- 2,103
- 21
- 32