Google Cloud Stogage cache control issue with Google CDN

247 Views Asked by At

I use Google CDN with load balancer and changed the metadata for the existing object to reset cache control.

$ gsutil setmeta -h "Cache-Control:private, max-age=0, no-transform" gs://bucket/*.jpg

And I updated the new object, but I still got the old object.

Any help why it still has the old object?

1

There are 1 best solutions below

0
On

Changing the metadata on a Cloud Storage object does not remove any already cached copies from Cloud CDN caches. To instruct Cloud CDN to stop serving from cache, you can request a cache invalidation. There's more information at https://cloud.google.com/cdn/docs/cache-invalidation-overview.