To get the caching to work correctly, I would need to put my Html.RenderAction() call inside a ViewUserControl with the OutputCaching directive set as follows:<@ OutputCache Duration="100" VaryByParam="None" %>然后我用 Html.RenderPartial() 调用上面的代码,瞧,一切正常!I then call the above with Html.RenderPartial(), and voila, it all works! 这篇关于带有缓存的 ASP.Net MVC 数据库驱动菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
07-17 07:34
查看更多