How to implement Cache-Control meta data for all files in the bucket

December 20, 2018 873 views
Caching Block Storage Ubuntu

I would like to implement Cache-Control meta data for all files in the Digital Ocean Space but couldn't find a way to implement it. Also it would be perfect to know if there is any way to set this option for new upload files.

2 Answers
jarland MOD December 20, 2018
Accepted Answer

Hey friend,

There is not currently a way to set this as default or mass apply via UI, but there two options. You can set it per file via the UI as shown here:

https://www.digitalocean.com/docs/spaces/how-to/metadata/

You can also use s3cmd to help you take control of more than just one file at a time:

https://www.digitalocean.com/docs/spaces/resources/s3cmd-usage/

I'm not sure if this guide is up to date, but I found this on the subject of using s3cmd to recursively update metadata:

http://www.improvi.in/using-s3cmd-to-recursively-update-the-meta-data-on-a-bucket/

Jarland

Hi Jarland,

Thank you for your detailed answer, much appreciated!

Have another answer? Share your knowledge.