woensdag 1 februari 2017

Fixed issue with cached content

In past week two users reported issues that time entries from other users were displayed in their overviews! Not good..  I looked into the matter and I think this is because some JSON responses were being cached and displayed to several users while the content in those JSON responses was only meant for one person. To disable caching of JSON responses on the IIS Server, I added the following attribute on each controller that has JSON actions:

[OutputCache(NoStore = true, Duration = 0)]

Perhaps a bit of overkill to specify this for all actions on a controller, but it is important that cached content is never served to the wrong user..

More about ASP.NET MVC caching in these links:



Bert-Jan


Geen opmerkingen:

Een reactie posten