Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/oop/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Caching 向Google云存储桶中的所有新资产添加缓存头_Caching_Google Cloud Storage - Fatal编程技术网

Caching 向Google云存储桶中的所有新资产添加缓存头

Caching 向Google云存储桶中的所有新资产添加缓存头,caching,google-cloud-storage,Caching,Google Cloud Storage,我知道可以将缓存头添加到现有的Google Cloud bucket对象中 gsutil setmeta -h "Content-Type:text/html" \ -h "Cache-Control:public, max-age=3600" \ -h "Content-Disposition" gs://bucket/*.html 这适用于bucket中的所有现有文件,但新上载的文件不会有这些缓存头 我如何告诉谷歌将这个头添加到每个添加到bucket的新文件中 FWIW:我正在使

我知道可以将缓存头添加到现有的Google Cloud bucket对象中

gsutil setmeta -h "Content-Type:text/html" \
  -h "Cache-Control:public, max-age=3600" \
  -h "Content-Disposition" gs://bucket/*.html

这适用于bucket中的所有现有文件,但新上载的文件不会有这些缓存头

我如何告诉谷歌将这个头添加到每个添加到bucket的新文件中


FWIW:我正在使用Carrierwave和Rails中的Fog,但我猜这与这个问题无关。

这个问题是在感谢Mike之前提出并回答的,太糟糕了,Google不支持默认标题。