Subject: Why is Cloudflare not caching my site?
Direct Response
Thanks for the curl output. The headers show Cache-Control: no-store, no-cache, must-revalidate... which instruct Cloudflare not to cache this content. By default, Cloudflare respects origin headers.
Thought Process
Cloudflare won’t cache resources marked as no-cache by the origin, or responses with cookies in many cases. The primary reason here is the origin headers.
Steps I’d Recommend
- Update origin headers to allow caching (e.g.,
Cache-Control: public, max-age=3600). - Create a Page Rule with “Cache Everything” and set Edge Cache TTL for the desired paths.
- Check for cookies that may prevent caching.
- Purge the cache after updating rules.
Tools Used
- curl -I — to inspect headers like Cache-Control and CF-Cache-Status.
- Cloudflare Dashboard — to configure Page Rules and caching.
- Origin server config — to update headers at the source.
Summary: the origin headers are preventing caching. Adjust headers or use a Page Rule to override if appropriate.