0
如何在ASP.NET中将缓存控制设置为“no-cache,no-store”?我是否必须实现缓存每个响应的缓存模块,还是可以使用ASPX页面本身的OutputCache来完成缓存模块?在asp.net中设置缓存控制
如何在ASP.NET中将缓存控制设置为“no-cache,no-store”?我是否必须实现缓存每个响应的缓存模块,还是可以使用ASPX页面本身的OutputCache来完成缓存模块?在asp.net中设置缓存控制
Response.CacheControl = "no-cache";
Response.AddHeader("Pragma", "no-cache");
Response.AddHeader("Pragma", "no-store");
Response.AddHeader("cache-control", "no-cache");
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetNoServerCaching();