Donut Caching ASP.NET MVC2

2019-04-07 00:35发布

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条回答
乱世女痞
2楼-- · 2019-04-07 01:19

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.

查看更多
该账号已被封号
4楼-- · 2019-04-07 01:34

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...

查看更多
贼婆χ
5楼-- · 2019-04-07 01:36

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.

查看更多
登录 后发表回答