【发布时间】:2012-10-12 23:39:15
【问题描述】:
Google Cloud Storage Developer Guide 解释了如何设置 Cache-Control 标头,并解释了它们对 api 一致性行为的关键影响,但没有提及 Expires 标头,它们似乎也没有从 Cache-Control 配置继承.
无论 Cache-Control 设置如何,Expires 标头似乎总是等于请求时间加上 1 年,例如。
$ gsutil setmeta -h "Cache-Control:300" gs://example-bucket/doc.html
通过
向 Google Cloud Storage 存储桶 (example-bucket) 中的文档 (doc.html) 发出了请求$ curl -I http://example-bucket.storage.googleapis.com/doc.html
产生了以下标题
HTTP/1.1 200 OK
Server: HTTP Upload Server Built on Oct 3 2012 16:52:30 (1349308350)
Date: Sat, 13 Oct 2012 00:51:13 GMT
Cache-Control: 300, no-transform
Expires: Sun, 13 Oct 2013 00:51:13 GMT
Last-Modified: Fri, 12 Oct 2012 20:08:41 GMT
ETag: "28fafe4213ae34c7d3ebf9ac5a6aade8"
x-goog-sequence-number: 82
x-goog-generation: 1347601001449082
x-goog-metageneration: 1
Content-Type: text/html
Accept-Ranges: bytes
Content-Length: 7069
Vary: Origin
【问题讨论】:
-
看起来最近可能有一个错误(2018 年 4 月下载的文件)也导致了一年前的 Expires 标头:stackoverflow.com/questions/49708712/…,登录 issuetracker.google.com/issues/77842189 后直接问题跟踪器报告