1 Answers
There’s a metadata applied by default to public objects, called Cache-Control
. The default value is public, max-age=3600
, which means your public object will be cached for an hour by browsers since first access.
So despite changing permission back to "non-public", basically what you were trying to access was a cached version of that object available since your first access to it.
If you want no cache on your object so that a permission change is in effect immediately, you need to explicitly define Cache-Control
with value of no-cache,max-age=0
. You can do that via Console or with the command gsutil setmeta
.