Google Cloud CDN忽略3600以上的最大寿命 [英] Google Cloud CDN ignores max-age over 3600

查看:122
本文介绍了Google Cloud CDN忽略3600以上的最大寿命的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在将Google Cloud CDN与后端存储桶一起使用.一切正常,我们看到了高速缓存命中率等,但是高速缓存率低于预期.经过分析,我发现请求的年龄都没有超过3600.尽管我们将max-age设置为86400.将其设置为较小的值也可以.这是定义的行为吗?我们设置错了吗?

We are using Google Cloud CDN with a backend-bucket. Everything works correctly, we see cache-hits etc. but the cache rate is lower than expected. Analyzing it, i recognized that none of the request has an age above 3600. Although our max-age is set to 86400. Setting it to something smaller works. Is this defined behaviour? Are we setting anything wrong?

以下是其中一个文件的标题:

Here are the headers for one of the files:

HTTP/2 200 
x-guploader-uploadid: AEnB2Ur4sV1ou6Av1U8OgQC8iNxgFmLzAbQ4bFQ4mBAYCyBOHviUAfAbkWFUycAUGLYDYbgNSdaw_zdkE6ySLdRTe0vScOh3Tw
date: Wed, 05 Sep 2018 14:40:29 GMT
expires: Thu, 06 Sep 2018 14:40:29 GMT
last-modified: Thu, 02 Mar 2017 15:31:23 GMT
etag: "1293d749638a24bf786a15f2a2a6ca76"
x-goog-generation: 1488468683233688
x-goog-metageneration: 3
x-goog-stored-content-encoding: identity
x-goog-stored-content-length: 89976
content-type: text/plain
x-goog-hash: crc32c=nIbPdQ==
x-goog-hash: md5=EpPXSWOKJL94ahXyoqbKdg==
x-goog-storage-class: STANDARD
accept-ranges: bytes
content-length: 89976
access-control-allow-origin: *
access-control-expose-headers: x-unity-version
access-control-expose-headers: origin
server: UploadServer
age: 3041
cache-control: public, max-age=86400
alt-svc: clear

推荐答案

根据此 Cloud CDN文档

请注意,高速缓存条目的到期时间是高速缓存条目保持有效时间的上限.不能保证缓存条目将在其过期之前保留在缓存中.可以将不受欢迎内容的缓存条目驱逐出去,以便为新内容腾出空间.无论指定的到期时间如何,都会自动删除30天未访问的缓存条目.

Note that a cache entry's expiration time is an upper bound on how long the cache entry remains valid. There is no guarantee that a cache entry will remain in the cache until it expires. Cache entries for unpopular content can be evicted to make room for new content. Regardless of the specified expiration time, cache entries that aren't accessed for 30 days are automatically removed.

话虽如此,我们能够重现相同的行为.因此, 为了确认是否确实是预期的行为或问题,我在上创建了一个新的问题为方便起见, Google问题跟踪器.

That being said, we were able to reproduce the same behavior. Hence, in order to confirm if it is indeed an expected behavior or an issue, I have created a new issue on the Google Issue Tracker for your convenience.

这篇关于Google Cloud CDN忽略3600以上的最大寿命的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆