有什么方法可以禁用Web窗体中的缓存,我不能随身携带任何代码。我有一个webconfig。那里有一种方法来禁用缓存
将此应用 beginrequest
HttpContext.Current.Response.Cache.SetExpires(DateTime.UtcNow.AddDays(-1));
HttpContext.Current.Response.Cache.SetValidUntilExpires(false);
HttpContext.Current.Response.Cache.SetRevalidation(HttpCacheRevalidation.AllCaches);
HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache);
HttpContext.Current.Response.Cache.SetNoStore();
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句