The Slowpoke
Slow, repeated renders make global readers wait and hammer your origin. Cloudflare caches the response at the edge, so the first visitor pays the cost once and everyone after gets it instantly.
The pain
Every reader triggers a fresh, expensive render, so pages crawl and origin carries load it never needed to.
The fix
Cache the rendered response at the edge: the first visitor pays once, everyone after is served in single-digit milliseconds.
So what
Faster pages lift conversions and SEO while cutting origin load and compute cost, with no new infrastructure.
Try it
Load the page.
First load is a cache MISS (a ~700ms origin render). Load it again and it's a HIT from the edge cache, in single-digit milliseconds. Purge to feel the slow path again.
Workers Cache API. The rendered at timestamp stays the same on every HIT, proof you're getting the one cached copy, not a re-render.
How it works
Cache the rendered response at the edge so the first visitor pays the cost once and everyone after is instant.
Add it to your site
~8 lines · no infrastructureconst cache = caches.default;
let res = await cache.match(request); // HIT?
if (!res) {
res = await renderExpensive(); // MISS: pay once
res.headers.set('Cache-Control', 'public, max-age=60');
ctx.waitUntil(cache.put(request, res.clone()));
}
return res;Official Cloudflare docs