Report this

What is the reason for this report?

Spaces CDN TTL question

Posted on January 6, 2019

Just wondering - with the Spaces CDN, if you set a low TTL, does a client requesting an expired file (that hasn’t been modified):

  1. Always download a new file from Origin > Edge > Client, or

  2. The CDN Edge does a request to Origin, receives 304 Not Modified and returns the cached file from Edge > Client ?

??



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.