在caching失效时 ,HTTP规范说:
一些HTTP方法必须导致caching使实体无效。 这可以是Request-URI引用的实体,也可以是Location或Content-Location头(如果存在)。
我试图通过使用位置标题使我的caching中的条目无效,但似乎没有工作。 这是我的用例:
15:13:23.9988 | GET | folders/folder.34/contents - 200 (OK)
15:13:24.1318 | PUT | folders/folder.34/contents/test.docx - 201 (Created)
15:13:24.1548 | GET | folders/folder.34/contents - 200 (OK) (cached)
(2)的响应包含请求(1)和(3)中使用的URI的Location标头。 我相信这应该使文件夹/文件夹的caching条目无效。但是,根据HttpWebResponse.IsFromCache属性,(3)中的响应看起来好像来自caching。
Apache:url中的%25(400错误请求)
我可以设置由我的Apache Web服务器提供的PDF文件的“HTML”标题吗?
间歇性慢轨应用程序
网站非常缓慢的Firefox,即时在其他浏览器:KeepAlive问题?
Location: ../../../folders/folder.34/contents folders/folder.34/ Location: ../../../folders/folder.34/contents (和其他各种“../”计数)
Location: folders/folder.34/contents
Location: /folders/folder.34/contents
Location: http://myhostname/folders/folder.34/contents
但(3)似乎总是来自caching。 我在这里做错了什么?
Nginx,ssl,CORS,以及Access-Control-Allow-Origin值跨站点的caching
如何将httpredirect到https运行Nginx的Elastic Beanstalk?
Nginx的位置正则expression式捕获variables
服务器响应terminal线路分析。 响应热线的最后一部分是什么?
如何使用curl在Windows下发布PUT请求?
HTTPBis更清晰:
http://tools.ietf.org/html/draft-ietf-httpbis-p6-cache-22#section-6
Because unsafe request methods (Section 4.2.1 of [Part2]) such as PUT,POST or DELETE have the potential for changing state on the origin server,intervening caches can use them to keep their contents up-to-date. A cache MUST invalidate the effective Request URI (Section 5.5 of [Part1]) as well as the URI(s) in the Location and Content-Location response header fields (if present) when a non-error response to a request with an unsafe method is received.
所以,如果这不是你所看到的行为,我的假设就是你正在使用的特定的HTTP客户端没有正确的行为。
我特别期待:
Location: /folders/folder.34/contents
要有正确的行为。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。