I have the following action method, which cache the data on the client for around 300 seconds:
[CheckUserPermissions(Model = "Admin")]
[OutputCache(CacheProfile = "short", Location = OutputCacheLocation.Client, VaryByHeader = "X-Requested-With")]
public ActionResult SystemInfo(int page = 1,bool forTechAudit=false)
{
But if user logout from the application using the following action method:-
public ActionResult LogOff2()
{
// WebSecurity.Logout();
FormsAuthentication.SignOut();
return RedirectToAction("Index", "Home");
}
The cached data from the action method can still be accessible, so if a user navigate to the action method after logout, he will get the cached data and it will shows that he is still logged in. Can anyone advice what are the options to avoid this, so after loggin out cached data should not be accessable? And why by default this is being handled by the MVC framework ?
Thanks