Extend cache time?

I'm hitting 429 errors on my photo provider (backblaze), wondering if there's any way to extend the time that a file is cached after access? I see "Browser Cache TTL" but that appears to be on the user/browser level, I'd like to extend it globally.
6 Replies
Laudian
Laudian•4mo ago
You can set a high maximum, but there's no guarantee it'll stay cached that long. Files can always be evicted from cache if it makes more sense for Cloudflare to use the available resources on other files. You can use Tiered Caching to reduce the amount of requests going to your backend: https://developers.cloudflare.com/cache/how-to/tiered-cache/
Cloudflare Docs
Tiered Cache
Tiered Cache uses the size of Cloudflare’s network to reduce requests to customer origins by dramatically increasing cache hit ratios. With data centers around the world, Cloudflare caches content very close to end users. However, if a piece of content is not in cache, the Cloudflare edge data centers must contact the origin server to receive ...
Emily Ginsburg
Emily GinsburgOP•4mo ago
Thank you so much for the quick response! Will enabling tiered cache purge my existing cache or have any other consequences?
Laudian
Laudian•4mo ago
It'll increase latency on cache misses, as there's an additional tier of cache to check. I don't believe it should purge your current cached files, but don't quote me on that.
Emily Ginsburg
Emily GinsburgOP•4mo ago
Cool, and it won't cache a 429 error I assume, right? 🙂
Laudian
Laudian•4mo ago
It doesn't change what's cached compared to what is cached currently, it just introduces an additional tier that is checked before a request is sent to your backend.
Emily Ginsburg
Emily GinsburgOP•4mo ago
Really appreciate the help!!

Did you find this page helpful?