-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve cache times of GCS-hosted images #210
Comments
I think we can do this via settings for django-storages, so no SRE magic needed, but just ccing you @bkochendorfer because I know how much you love cache-control :) |
Heya @bkochendorfer - here's an interesting (and non-critical) one... Looking at this, the images in GCS are coning back with But in theory when we upload them we are setting:
and the Any chance there is something going on at GCS (or at the CDN layer for when the origin is GCS) please? |
Can you provide an example URL for me to investigate? |
@bkochendorfer D'oh that would have been useful for me to do, yeah. https://storage.googleapis.com/future-prod-prod-storage/images/ai.original.svg is an example of a GCS-held image where the cache time isn't what we're expecting. No super rush to look at this. Thanks, dude! |
Wagtail stores user media in a GCS bucket, and pages load those assets directly from the bucket.
I've just noticed that the max-age for the Cache-control header is 1hr.
It would be good to increase this. I don't think there's a downside of a high TTL: if someone uploads a file with the same filename, the settings will ensure that the new file has a different filename to an existing one.
The text was updated successfully, but these errors were encountered: