Module controller calls are being cached

Topics: Troubleshooting, Writing modules
Dec 19, 2013 at 4:42 PM
We are creating an Orchard module--very simple MVC app--and for each of our controller actions, only the first call is actually making it to the controller action. All subsequent calls are somehow returning cached results. Unless we explicitly implement a caching scheme, I would expect each controller action to be hit each time it's called.

Is this a known issue or something that we can change in the Orchard configuration?
Dec 19, 2013 at 5:01 PM
One of my developers found the solution:

"You can configure the caching for each view in your module in the Orchard Admin.
Under "Settings", click on "cache".
Scroll down to your module and enter "0" for the duration of each view.
  • Scroll down to your module and enter "0" for the duration of each view you want to have no caching."
It took us all morning to figure out why this was going down.
Coordinator
Jan 5, 2014 at 7:54 AM
You can also do it from code by decorating your actions with [OutputCache(NoStore=true, Duration=0)]