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();