4

这怎么可能?对于同一个文件,Date/Expires/Last-Modified 标头有很大的不同。即使今天(4 月 8 日)修改了此文件,它也会随机返回 4 月 7 日,之后是 4 月 3 日或 4 日!

curl -I http://storage.googleapis.com/myappname.appspot.com/config/config.json
HTTP/1.1 200 OK
X-GUploader-UploadID: AEnB2UoPjuz3v6i-RioExWbgl1JULi-FqGuXlljVXfQBCa3Xg5aSAGm9SslQu1m2I9ITSE6223FgsNjTiBMr4aS-QBeDumyv89n87pAnPpII7wffRZtCW70
Date: Sat, 07 Apr 2018 18:18:55 GMT
Expires: Sun, 07 Apr 2019 18:18:55 GMT
Last-Modified: Sat, 07 Apr 2018 17:25:44 GMT
ETag: "0a8411662813a125f999edad6079d7a5"
x-goog-generation: 1523121944356178
x-goog-metageneration: 1
x-goog-stored-content-encoding: identity
x-goog-stored-content-length: 41487
Content-Type: application/json
x-goog-hash: crc32c=x7F/0g==
x-goog-hash: md5=CoQRZigToSX5me2tYHnXpQ==
x-goog-storage-class: STANDARD
Accept-Ranges: bytes
Content-Length: 41487
Server: UploadServer
Cache-Control: no-cache
Age: 57035

curl -I http://storage.googleapis.com/myappname.appspot.com/config/config.json
HTTP/1.1 200 OK
X-GUploader-UploadID: AEnB2UpWhRGTwxsME436eKKeSf507oBN4mfT9MZLknOVb92GdRmV-Cs8z8UTVDvoENIeN6fq9PL9A3HkRLgVIWJFhzfVM4Ysy4xz20ZS1Z-Ez18i1islc1o
Date: Wed, 04 Apr 2018 13:34:51 GMT
Expires: Thu, 04 Apr 2019 13:34:51 GMT
Last-Modified: Wed, 04 Apr 2018 07:14:23 GMT
ETag: "522c4e9f5f97873f930501b69da311cf"
x-goog-generation: 1522826063699049
x-goog-metageneration: 1
x-goog-stored-content-encoding: identity
x-goog-stored-content-length: 40298
Content-Type: application/json
x-goog-hash: crc32c=ZhnEqg==
x-goog-hash: md5=UixOn1+Xhz+TBQG2naMRzw==
x-goog-storage-class: STANDARD
Accept-Ranges: bytes
Content-Length: 40298
Server: UploadServer
Cache-Control: Cache-Control:no-cache
Age: 333838

它只是拒绝返回对该文件所做的最近更改,即使在数小时后也是如此。

更新:追踪路线

traceroute to storage.googleapis.com (216.58.197.80), 30 hops max, 60 byte packets


1  192.168.0.1 (192.168.0.1)  1.544 ms  1.582 ms  1.973 ms
 2  10.247.0.1 (10.247.0.1)  5.637 ms  5.641 ms  5.624 ms
 3  broadband.actcorp.in (202.83.20.173)  5.609 ms  6.521 ms  6.524 ms
 4  broadband.actcorp.in (202.83.20.181)  6.520 ms  6.534 ms  6.941 ms
 5  broadband.actcorp.in (202.83.20.50)  11.394 ms  11.889 ms  11.881 ms
 6  72.14.194.18 (72.14.194.18)  45.704 ms  42.574 ms  42.644 ms
 7  * 108.170.253.113 (108.170.253.113)  42.576 ms *
 8  108.170.237.95 (108.170.237.95)  43.536 ms 108.170.236.197 (108.170.236.197)  45.852 ms  45.865 ms
 9  maa03s21-in-f16.1e100.net (216.58.197.80)  45.847 ms  43.914 ms  45.781 ms

截至今天(4 月 10 日),我仍然看到:

Date: Wed, 04 Apr 2018 15:35:28 GMT
Expires: Thu, 04 Apr 2019 15:35:28 GMT
Last-Modified: Wed, 04 Apr 2018 07:14:23 GMT
ETag: "522c4e9f5f97873f930501b69da311cf"
x-goog-generation: 1522826063699049
x-goog-metageneration: 1
x-goog-stored-content-encoding: identity
x-goog-stored-content-length: 40298
Content-Type: application/json
x-goog-hash: crc32c=ZhnEqg==
x-goog-hash: md5=UixOn1+Xhz+TBQG2naMRzw==
x-goog-storage-class: STANDARD
Accept-Ranges: bytes
Content-Length: 40298
Server: UploadServer
Cache-Control: Cache-Control:no-cache
Age: 528505

但是,在我的办公室网络中,我看到了该文件的更新版本,但即使在那里它也不遵守“no-cache”指令,并且偶尔会显示陈旧的数据。

4

1 回答 1

0

免责声明,我为 Google Cloud Platform Support 工作,希望这些信息对您有用。

目前,工程团队已经意识到这个问题,他们目前正在高度优先地调查它。

注意:

自 2018 年 4 月 11 日美国太平洋时间 13:11 起,标记为 cache-control: no-cache 的 Google Cloud Storage 缓存对象的问题已得到解决。在 2018 年 4 月 19 日星期四之前,标有缓存控制的对象可能已被缓存,但有一种解决方法可用。

提供的解决方法

  • 使用 Cloud CDN 的客户:拥有存储桶作为 HTTP(S) 负载均衡器后端的客户可以通过gcloud 或云控制台发出缓存失效,手动使缓存中的对象过期。不使用 Cloud CDN 的客户:启用 Cloud CDN 将导致从 Cloud CDN 继续提供对象,这将解决该问题,因为 Cloud CDN 使用不同的设置。
于 2018-04-16T07:58:35.757 回答