简体   繁体   English

甜甜圈缓存ASP.NET MVC2

[英]Donut Caching ASP.NET MVC2

Is there a possibility to do Donut Caching with MVC2? 是否可以使用MVC2进行甜甜圈缓存? Even with a lot of research I was not able to find a working solution. 即使进行了大量研究,我仍然无法找到可行的解决方案。

Donut caching does not work with ASP.NET MVC 2, see http://forums.asp.net/t/1521502.aspx : 甜甜圈缓存不适用于ASP.NET MVC 2,请参见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. 这是一个重大的管道更改,并非产品v2中将包含的内容。

Cross-post from another question : 另一个问题交叉发布:

Donut Caching (yes, the real thing) is available as part of my 'speed-lib' for MVC: Moth . 甜甜圈缓存(是的,是真的)可以作为我的MVC“速度库”的一部分: Moth Works in both ASP.NET MVC 2 and MVC 3. 在ASP.NET MVC 2和MVC 3中均可使用。

Docs are at the wiki , and examples are in the Mvc3.Demo folder. 文档位于Wiki上 ,示例位于Mvc3.Demo文件夹中。

I think this may be useful. 我认为这可能有用。 It is possible using Html.Action and passing HttpContextBase instance to the child controller. 可以使用Html.Action并将HttpContextBase实例传递给子控制器。 Check it http://eliasbland.wordpress.com/2010/04/08/donut-caching-in-asp-net-mvc-2-with-html-action/ 检查它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... 但我不知道到目前为止是否可以正常使用...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM