Basically, with Cloudflare APO, your WordPress site’s HTML is cached in Cloudflare’s edge servers around the world. This is made possible by Workers KV → it’s the new method, different from previous attempts at HTML page caching for WordPress like “full-page cache”.
When data is written to Workers KV via the Cloudflare API, it’s automatically replicated to over 150 Cloudflare data centers around the world within seconds.
This makes Workers KV a prime candidate for speeding up WordPress sites because posts and pages can be easily represented by a key-value mechanism – the URL is the “key” and the HTML page content is the “value”.
Once APO is enabled for your WordPress site, the majority of requests to your site will no longer hit your origin server.
Instead, the request will either be served from a local Cloudflare CDN cache (if the cached page exists) or Workers KV (if the cached page doesn’t exist on Cloudflare’s CDN).
If a page doesn’t exist in the CDN cache or Workers KV database, then Cloudflare will make a single request to your origin server and cache the new page’s HTML.
In this case, APO utilizes a Cloudflare Worker to cache third-party fonts and modify your page’s HTML with inline CSS to point to the cached font on Cloudflare’s CDN. This removes the need for additional external requests to fetch fonts, and reduces the number of connections and load time required to serve a page.
Lastly, since APO integrates with your site via a WordPress plugin, the Cloudflare cache is automatically purged whenever you update a page on your site. This ensures that visitors will always be able to see the latest version of your site without any manual intervention.