I am a beginner in ASP.Net MVC 5. And I have applied caching in certain controller actions. Now I want an action to clear the client cache. How to achieve it. Here is what I have now:
[OutputCache(Duration = 10800, Location = OutputCacheLocation.Client)]
public PartialViewResult Temp()
{
return PartialView("Index", data);
}
Link I looked: ClearCache
It has a solution which tells to use: Response.Cache.SetNoStore
But it will tell client to never cache right? I am lost here. Please guide me. Under certain scenario only I want the cache to get cleared. In other scenarios caching should take place as expected.