Author: you've been HAACKED | Posted on: 11/5/2008 5:45:09 PM | Views : 832

With ASP.NET MVC , you can easily cache the output of an action by using the OutputCacheAttribute like so. [OutputCach(Duration=60, VaryByParam= "None" )] public ActionResult CacheDemo() { return View(); } One of the problems with this approach is that it is an all or nothing approach. What if you want a section of the view to not be cached? Well ASP.NET does include a <asp:Substitution ?/> control which allows you to specify a method in your Page class that gets called every time the page is requested. ScottGu wrote about this way back when in his post on Donut Caching . However, this doesn?t seem very MVC-ish, as pointed out by Maarten Balliauw in this post in which he implements his own means for adding output cache substitution...(read more) ...

Go to the complete details ...