c# - Ways to workaround whole page caching in ASP.NET MVC -
Currently ASP.NET MVC's output cache attribute is a big fall if you want to cache parts of your site So you have to use an alternative solution due to the limit of pipelines of ASP.NET, which is dependent on MVC.
Render Action You can not cache that part of the page outside the box.
My question is, what methods have you found around this border that is elegant and easy to use? I have personally found 2 of them neither I am especially happy although they work, they feel misinterpreted in making the application around them.
Solution 1 - Sub-Controller
Solution 2 - Partial Request
So if you have another solution or maybe you have one of these solutions And I like some ideas about design and / or use.
I have done option 2 (using Html.RenderAction) with this very good success. I also created separate base classes for my controllers, one cache and one not so that I put all my cached tasks in one place. I do not do this often, so it is not very bad to separate these tasks, I had written with a combination of caching and a gzip compression filter that I get very fast performance from MVC.
Comments
Post a Comment