[英]Setting Cache-Control metadata via gsutils does not update response headers
When setting the cache-control metadata key via the gsutils command:通过 gsutils 命令设置缓存控制元数据键时:
gsutil -m setmeta -h "Cache-Control:public, max-age=14400" 'gs://my-bucket/style.css'
I verify that the metadata is updated correctly using another gsutils command:我使用另一个 gsutils 命令验证元数据是否已正确更新:
gsutil stat 'gs://my-bucket/style.css'
However, when accessing this object via curl --head
the value is not update但是,当通过
curl --head
访问此 object 时,值未更新
content-type: text/css
age: 232
cache-control: public,max-age=3600
I am expecting for the max-age of the cache-control property to be set to the value specified in the gsutil command which is 14400.我期望将 cache-control 属性的 max-age 设置为 gsutil 命令中指定的值,即 14400。
I was not using the correct cache-mode on the bucket, solution was in updating the cache-mode to USE_ORIGIN_HEADERS.我没有在存储桶上使用正确的缓存模式,解决方案是将缓存模式更新为 USE_ORIGIN_HEADERS。 Thank you!
谢谢!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.