On my site there is a page where a user can see a list of all the payments they need to make, select a file, and make that payment. The problem I am having is if the user makes a payment on a file and then types in the URL of the payment grid page a cached page appears still showing the file that has already been paid, allowing the user to submit a second payment. What I would like to do is always go through the controller so if the user types in this URL they would re-generate the model and this file would no longer appear. Is there a way to turn of caching for a certain page? Any ideas on how to work around this?
Share
You could create a custom action filter to set proper response headers in order to instruct the browser not to cache the results of the page:
and then decorate the controller action with this attribute: