Cloudflare Cache Reserve Eliminates Caching Plugins!

Cloudflare Reserve

Cloudflare’s Cache Reserve will let you completely eliminate WordPress caching plugins when it rolls out. Now you can have true CDN hosting in the cloud with your content stored globally for a fraction of your hosting costs. With the Cloudflare cache reserve, the performance of cheap web hosting will match the performance of expensive hosting providers for static content.

Cloudflare Cache Reserve Replaces Caching Plugins

WordPress caching plugins like W3TC store static copies of site pages on your server and serve them to subsequent visitors. In this way, the server has to generate each page only once. But caching plugins introduce some inefficiency, and the first page load is always somewhat slower than without a plugin. This explains why server-side caching is so good because the web server handles caching instead of the WordPress installation.

Even before Cache Reserve, you could use Cloudflare to cache your entire WordPress site. I been using this technique for years. Local caching was still useful, however, when Cloudflare kicked assets out of its cache for inactivity. But with Cloudflare cache reserve, we don’t need local caching at all. Instead, we can outsource the entire caching functionality to Cloudflare without disturbing our own servers. The speed gains are staggering, as you no longer have to worry about slow and overloaded servers.

Ordinary CDNs Ignore Your Cache Retention Preferences

Have you ever wondered why your CDN cache hit rate is never 100%, even when you’re sure the CDN should have cached a specific resource? That’s because all CDNs ignore your cache retention when no one requests a file for a certain period. My research indicates that CDNs automatically flush their cache when no one accesses a file for two days.

This impacts low-traffic sites particularly hard because it can sometimes be a few days before someone requests a file; by that time, the CDN has already dropped it. Even for high-traffic sites, so-called “long tail content” was a problem, where a large percentage of content is served infrequently and gets flushed out of the CDN cache.

Infinite Cache Retention with Cloudflare Cache Reserve

Even though, in my opinion, the Cloudflare free tier is superior to even paid CDNs, it suffered from the same cache retention problems as KeyCDN or BunnyCDN. Infrequently accessed long-tail resources suffered terribly. But Cloudflare cache reserve changes all that.

By leveraging its R2 storage solution, Cloudflare Cache Reserve can now store your cached content indefinitely, regardless of how infrequently it’s accessed. This massive paradigm change brings Cloudflare closer to being an action web host rather than just a CDN. Imagine having every page and resource on your website served from a distributed, global storage network. The load to your origin server will be minuscule.

You can further increase your site speed by configuring Cloudflare to serve stale content, whereby it sends an older version of a typically static file to the user while refreshing the one in cache with a request to the origin server.

Narrowing the Gap Between Cheap and Expensive Hosting

Cloudflare Cache Reserve can help eliminate the gap between cheap and expensive hosting. Your origin server will have far less load since it needs to generate a page just once. As far as static content is concerned, there won’t be any performance difference for a visitor between a cheap web host like HostGator and an expensive one like Kinsta.

The expensive host will outperform cheap hosting for dynamic content and backend work but not for page load times since Cloudflare Cache Reserve cuts out the origin server entirely. I anticipate more people opting for low-cost hosts because of this.

Cache Reserve Works Best with Super Page Cache for Cloudflare

The Super Page Cache for Cloudflare plugin for WordPress lets you cache your entire site using Cloudflare, instead of just static assets. Combined with Cache Reserve, it means that your origin server will almost never be bothered by unnecessary requests. You don’t need to use Cloudflare to change the cache-control headers, because the plugin does it for you automatically.

Cloudflare Cache Reserve Pricing: Almost Free for Small to Medium Sites

Here’s the initial pricing for Cloudflare Cache Reserve:

Cloudflare Cache Reserve Pricing
Cloudflare Cache Reserve Pricing

Based on some back-of-the-envelope calculations, my website won’t hit any of these quotas for several months at least. So the total cost for my site will be negligible – almost free. It’s an unbelievable value proposition that’s far cheaper than ordinary paid CDN providers who neither store dynamic content nor retain their cached files for an infinite amount of time.

How to Enable Cloudflare Cache Reserve

To enable Cloudflare Cache Reserve, click “Caching” on the dashboard, and choose “Cache Reserve” as shown here:

Cloudflare Cache Reserve Settings
Cloudflare Cache Reserve Settings

The service is in Beta, so you can sign up to receive updates. But I got my invitation within just a few days. After enabling it, you can see that Cache Reserve is storing data:

Cloudflare Cache Reserve Usage Data
Cloudflare Cache Reserve Usage Data

As you can see, in six days my usage is very minimal. It will take forever for me to reach a million write operations!

Cloudflare Cache Reserve Extends Tiered Cache

Cloudflare Cache Reserve is meant to extend the “Tiered Cache” service. You can access tiered caching on Cloudflare as shown here:

Cloudflare Tiered Cache works with Cache Reserve
Cloudflare Tiered Cache works with Cache Reserve

Tiered cache lets the various POP servers worldwide refer to “higher-level” caches to retrieve content instead of querying the origin server, significantly reducing the origin load. Cache Reserve serves as the ultimate “upper-tier cache” so Cloudflare never has to query the origin server.

“Content-Length” Header is a Limitation of Cloudflare Cache Reserve

One problem with Cloudflare Cache Reserve is that it only caches assets with a “Content-Length” response header. While this is fine for static images like images, CSS, and JS, pages generated by WordPress and compressed with gzip or Brotli compression don’t use this header and instead implement something called “chunked encoding”. There’s no easy way to resolve this. I reached out to Alex Krivit on the Cloudflare team via Twitter to see if they would consider removing this requirement:

Request to Remove Content-Length Header for Cloudflare Cache

I’m optimistic that they can remove the “Content-Length” response header requirement since they can already cache content without it using Page Rules or Cache Rules. Once this is removed, we’ll truly have a distributed hosting service!

Look for More Services Based on R2 Storage

Reserve uses Cloudflare’s new R2 storage architecture, looking to pose as a rival to AWS and other cloud storage services. I fully anticipate that Cloudflare will come out with new services like automatic backups. You can already use R2 for that purpose, but I find it very complicated to set up. I enjoy easy configurations, and the implementation of Cloudflare Cache Reserve gives me faith that Cloudflare will bring more of such services moving forward.

About Bhagwad Park

I've been writing about web hosting and WordPress tutorials since 2008. I also create tutorials on Linux server administration, and have a ton of experience with web hosting products. Contact me via e-mail!

Speak Your Mind