Reputation: 537
I've just updated a mvc 2 project to mvc 3 . I have the following attribute on my controller: [OutputCache(NoStore =true, Duration = 0, VaryByParam = "*")] this gives me the following exception : Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'.
If I remove the attribute it's fine, but I need this attribute to prevent caching in this controller.
any ideas?
Upvotes: 0
Views: 1072
Reputation: 2352
The attribute is no longer supported in MVC3
From Scott Gu's blog
ASP.NET MVC 3’s output caching system no longer requires you to specify a VaryByParam property when declaring an [OutputCache] attribute on a Controller action method. MVC3 now automatically varies the output cached entries when you have explicit parameters on your action method – allowing you to cleanly enable output caching on actions using code like below:
Upvotes: 2