As the title says, how can i clear Outputcache on client side? I have several ajax calls that needs to be cleared after user does some specific actions.
I tried:
Response.RemoveOutputCacheItem(Url.Action("Action", "Controller"));
But it didn't work.
I even tried to expire it mannually (even though this 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 worked out too.
Just to be clear, i'm using OutputcacheLocation = Client
. If i set it to Server
the examples above work flawlessly.