Google Cloud Storage Metadata

Share on:


If you are using a Google Cloud Storage bucket for application development you may want to use this handy tip. When working with data, you can turn off the cache-control option. If you want to test things like temporary JSON or image files, this setting is super useful.

Amend the bucket metadata

Google Cloud Storage provides a number of metadata key/value pairs. One useful setting is the Cache-Control. The default option is to have cache enabled. If you plan to use temporary data, it might be advisable to amend the setting as follows:

Field Value
Cache-Control no-store, max-age=0

Effectively this tells Google Cloud Storage to not cache the object. The benefit of this is, when data is replaced, it will refer to the latest version, rather than using eventual consistency.

To learn more about metadata settings: