As the name says , how can I clear the outputcache on the client side ? I have several ajax calls that need to be cleared after the user performs certain actions.
I tried:
Response.RemoveOutputCacheItem(Url.Action("Action", "Controller"));
But that did not work.
I even tried to expire it all the time (even if that would be a bad approach):
Response.Expires = 0;
Response.ExpiresAbsolute = DateTime.Now.AddMinutes(-1);
Response.AddHeader("pragma", "no-cache");
Response.AddHeader("cache-control", "private");
Response.CacheControl = "no-cache";
That didn't work either.
To be clear, I use OutputcacheLocation = Client. If I install it on Server, the above examples work flawlessly.
source
share