CoreSpeed uses a custom Cloudflare Worker rather than relying only on Cloudflare’s default static-asset cache.
Cache layers
The page-cache Worker uses two Cloudflare services:
Cache API
The Cache API stores responses in the Cloudflare data center handling the request.
Cache API content is regional and does not automatically replicate to every Cloudflare location.
Workers KV
Workers KV provides globally accessible, read-optimized storage.
CoreSpeed uses KV as a backing layer so another Cloudflare location may retrieve a previously stored page without sending the request all the way to WordPress.
Cloudflare describes KV as globally accessible storage suited to high-volume, read-heavy workloads and cached data.
Content revalidation
When WordPress content is updated:
- The CoreSpeed WordPress plugin notifies the Worker.
- The affected URL is purged from the edge cache.
- The KV version is marked stale.
- The next visitor can receive the existing page immediately.
- The Worker retrieves the updated page from WordPress in the background.
- The new version is saved for subsequent visitors.
This avoids forcing the first visitor after every edit to wait while WordPress regenerates the page.
The companion plugin can revalidate individual URLs after content changes or request revalidation of all URLs.
Bypass behavior
CoreSpeed evaluates:
- Authentication cookies
- WordPress administrative paths
- Dynamic application routes
- Query parameters
- Request methods
- Response headers
- Other signals indicating personalized content
Marketing parameters that do not change the page content can be normalized so they do not unnecessarily bypass the page cache.
Purging guidance
Avoid clearing the entire cache for routine content updates.
Cloudflare recommends targeted URL purges because a full purge causes subsequent requests to return to the origin and can create a significant traffic increase.
CoreSpeed’s normal WordPress integration handles targeted revalidation automatically.
Verifying cache behavior
The CF-Cache-Status response header can indicate statuses such as HIT, MISS, BYPASS, DYNAMIC, or UPDATING.
Example:
curl -I https://example.com/Because CoreSpeed also uses Worker and KV logic, CF-Cache-Status should be treated as one diagnostic signal rather than the only measure of whether CoreSpeed served the page efficiently.
Comments
0 comments
Please sign in to leave a comment.