© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Cloudflare DevelopersCD
Cloudflare Developers•11mo ago•
13 replies
Yaroslav

Cloudflare Pages Cache / and cache warm-up

The Essence of My Problem
I have a website (built with Astro.js + WordPress) on a domain, and I’ve set up caching rules (Cache Everything). In the middleware function, I added the following logic to cache HTML pages, as they are not cached by default:

newHeaders.set(
  "Cache-Control",
  "public, max-age=0, must-revalidate, s-maxage=31536000, stale-while-revalidate=86400"
);
newHeaders.set(
  "Cache-Control",
  "public, max-age=0, must-revalidate, s-maxage=31536000, stale-while-revalidate=86400"
);


I don’t understand how I can warm up the cache (ideally for all visitors and globally across the world) so that each page is pre-warmed for every individual user.
Cloudflare Developers banner
Cloudflare DevelopersJoin
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
85,042Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

does cloudflare pages cache workers?
Cloudflare DevelopersCDCloudflare Developers / pages-help
3y ago
cloudflare pages and subfolder
Cloudflare DevelopersCDCloudflare Developers / pages-help
13mo ago
Cloudflare Pages and Turborepo
Cloudflare DevelopersCDCloudflare Developers / pages-help
2y ago