资讯

filterContext.HttpContext.Response.Cache.SetCacheability (HttpCacheability.NoCache); filterContext.HttpContext.Response.Cache.SetNoStore; base.OnResultExecuting (filterContext); } } 但在 asp.net core ...
ASP.NET 2.0中出现的一个bug就是不能改变max-age头。当max-age设置为0时,ASP.NET 2.0会设置Cache-control为私有,因为max-age= 0意味着不需要缓存。因此,没有办法能够使得ASP.NET 2.0返回缓存响应的头。这是由于ASP.NET AJAX框架对Web服务调用进行了拦截并在执行一个请求之前,错误地将max-age设置为0作为默认值。