views:

96

answers:

2

Can I Implement Caching in MVC, If so how? I wanted to implement Cache in Controllers

+4  A: 

Simplest way to do that in controller is

[OutputCache(Duration = 10, VaryByParam = "none")]
public ActionResult Index()
  {
     return View();
  }
Amitabh
What about localisation?
UpTheCreek
Thanks Amitab, your solution is helpful ..But my doubt is Can I implement Application level cache in ASP.Net MVC..If so How? and I need to implement for the Objects data inside Index method not for Index method
Vinni
+1  A: 

You can use the asp.net caching mechanisms - http://msdn.microsoft.com/en-us/library/xsbfdd8c%28VS.9%29.aspx

Branislav Abadjimarinov