Just wondering - with the Spaces CDN, if you set a low TTL, does a client requesting an expired file (that hasn’t been modified):
Always download a new file from Origin > Edge > Client, or
The CDN Edge does a request to Origin, receives 304 Not Modified and returns the cached file from Edge > Client ?
??
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $100 of credit to try our products over 60 days!
Regardless of what TTL value you set if an object has expired from the CDN cache and you have CDN enabled when a request goes to the CDN and the object isn’t there, it is retrieved from the object store, cached, and then the cached object is returned to the source making the request.
The idea is that the cache is always kept fresh. So you want to limit the number of times that objects are being transferred so its:
Request -> CDN -> object expired -> Object Store -> Cached in CDN -> Returned