I have a basecontroller that makes sure pages expire so the back button will display a Webpage has expired. This is done like so:
[OutputCache(NoStore = true, Duration = 0, VaryByParam = “none”)]
However i want to have the default behavious where I can navigate back from one action on a controller that inherits from the base. It seems like no matter what a set the OutputCache attribute to on the action it still displays “Webpage has expired”. Any ideas now I can get it to cache on this one action?
Found a way around it by handeling when the nostore header without using the outputcache attributes
HttpContext.Current.Response.Cache.SetNoStore();
Does the job..