Caching for Infrequently Accessed Content, Not Worth it?

Let’s assume I have a static file that’s accessed once every three days from a certain POP. Is it worth caching on Cloudflare?

Because Cloudflare openly admits to clearing your cached files before the TTL has expired if the content is not accessed frequently enough. So in such a scenario, it’s better to disable Cloudflare and go directly to the origin server, thus saving some processing time, am I right?

My example of one access every 3 days is exaggerated of course. But there must be some lower frequency limit, after which the performance gains are negative. Am I right?

My personal experience shows that even one access per day is too low. Cloudflare will drop your file from the cache and ignore your TTL. Is there a way to guarantee a cache hit before the TTL? I’m willing to pay for such a feature, if it exists!

Cloudflare offers security features as well as other performance features beyond caching, so you may have to balance your concerns regarding this issue.

You may want to set up a monitoring service such as GTMetrix or Pingdom if they offer a server near the colocation (data center) most likely to be visited by your website users.

Also, you may want to check this script suggested by @eva2000 if having your files cached at several data centers is a must in your situation:


Static resources also tell browsers to cache files on their own. Like, 16 days is good.

1 Like

From basic maths assuming CF free plan, then yes it’s worth it. If only 10% of your requests are cached with CF, that is +10% more than without CF. Also you can modify how static files are cached using page rules and

As already mentioned browser level cache already can migitate the cache invalidation at CF’s end if you have the right browser cache control configured for repeat visitors at least and there’s other benefits for CF proxying which outweight the minor additional processing overhead of going through CF.

There’s various ways of improving the CF to origin connection speed as well including setting up CF Full SSL and setting up origin to use ECDSA 256bit SSL certs instead of RSA 2048bit SSL certificates and ensuring your origin server can support HTTPS TLS 1.3 as Cloudflare can now speak TLS 1.3 with origin backends in CF Full SSL mode - thus saving your 1-RTT round trip time.

This topic was automatically closed after 30 days. New replies are no longer allowed.