We’re currently on a business plan and using Cloudflare to serve map tiles (images) using workers. Our origin server generates these images based off of query string params. I just need clarification on a few things if anyone has answers.
Is there any kind of limit on our cache - total size or amount of items in the cache?
How can we force an item to stay in cache and only be removed if we purge or cacheTtl has expired? I have heard that if an item isn’t requested frequently it can be removed from the cache - how does this work exactly and what does “frequently” mean. Are we talking hours, days?
If our origin server returns 4xx or 5xx status codes these are cached - how do we prevent this? using the fetch api within workers, cacheTtlByStatus does not seem to work - getting a dynamic cf cache status when adding this option.
Looking forward to hearing some responses, thanks in advance.
Yes! There is a cache connection limit that protects Cloudflare systems! If the cache limit is exceeded. users will see “Error 1200: Cache connection limit”!
I’m not sure about the answer to that question.
Yes, if the website you are fetching is having an error, you’ll see a CF branded error like 4xx error 404, 5xx error 500, or even 520! You may also see 1xxx error “Error 1016: Origin DNS error”!