Reputation: 94
I've set up Google Cloud CDN with a Storage Bucket as a backend and tested that my requests were being cached before deploying into production use.
I am now finding that only certain paths/objects are being cached. (Confirmation in Logs Viewer, latency difference in requests and presence of Age:
header in the response.
After testing all morning I'm finding that there paths where all objects under that path are not being cache and paths where all objects under that path are being cached.
Permisions and Cache-Control:
headers were set globally using gsutil command.
Any pointers from anyone with Cloud CDN experience would be appreciated.
Path that is being cached: http://assets.affcdn.net/1/rolling.gif
Path that is not being cached: http://assets.affcdn.net/v3/android.png
Upvotes: 0
Views: 1199
Reputation: 94
This issue was resolved by editing the permissions of non caching files and granting read permission to 'allUsers' group.
This was not very well documented as the cache criteria only states that the files be shared publicly, which they had.
The GCP documentation Making Data Public had been followed previously and while this does make data public it does not make it cacheable as the allUsers permission is missing.
Upvotes: 3