简体   繁体   中英

Can Html.RenderAction be used as ASP.NET MVC 2.0's “donut caching”?

I'm not at a development system where I can test this. If I output cache a view, and inside that view have a Html.RenderAction that loads some html from a separate action, would that newly pulled in HTML be cached or would Html.RenderAction run every time, thus acting as donut caching for ASP.NET MVC 2.0?

No this does not get you donut caching. The complete result of the action is cached.

I think there is no way for donut caching in ASP.NET MVC2. Hopefully it is high on the list of todos of Scott Guthrie and his team

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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