For a image gallery I use amazon cloudfront.
I have set at the origin:
Cache-Control:max-age=31536000 (1 Year)
1. Is it usefull to set the TTL 0 (24 hours) to 1 Year too when I have already set the max-age?
2. Will amazon check the file with TTL0 every 24 hours when I have set the max-age to 1 year?
Amazon is saying:
Objects are cached for the greater of the value of the Cache-Control max-age directive or the value of the CloudFront Minimum TTL
Amazon is also saying:
If an object in an edge location isn't frequently requested, CloudFront might evict the object—remove the object before its expiration date—to make room for objects that are more popular.
In that case, I think its usefull to set TTL to year, because the images will stay for sure and not before? Please correct me.
Thanks for clarification.
Aucun commentaire:
Enregistrer un commentaire