Output caching with ASP.NET MVC Razor

added by jalpesh
12/2/2010 2:05:44 PM

0 Kicks, 221 Views

Caching data greatly increase the website performance as its not going to do server round trip. I have already mentioned how you can use Output caching in web forms in earlier blog post here. Let’s see how we can do same thing with asp.net mvc. For this example I have used asp.net mvc razor. In asp.net mvc you can use OutputCache attribute to cache the output. Just like below.[OutputCache(VaryByParam="none",Duration=60)] public ActionResult Index() { ViewModel.Message = DateTime.Now.ToString(); ...


3/28/2012 9:05:48 PM
Found very nice article on Donut Hole Caching in MVC.
The article also includes tutorial for it.
Do try it http://swsharinginfo.blogspot.in/2012/03/donut-hole-caching-partial-view-caching.html