I have successfully setup Cloudflare except for that one nasty problem.
So my origin server is sending these
public, max-age=300, stale-while-revalidate=86400, stale-if-error=259200
The PageRule for
www.domain.com/* is set to:
- Cache Level: Cache Everything
- IP Geolocation Header: On
- Automatic HTTPS Rewrites: On
- Bypass Cache on Cookie: auth_key
- Origin Cache Control: On
When I request my page with curl,
CF-Cache-Status is not set and the page is not in Cache.
WEIRDLY, if I request any sub page, the origin returns the SAME
Cache-Control header and voila, Cloudflare is caching the page. Just not the start page.
Here is the curl command I use to test my responses:
curl -vso /dev/null https://www.domain.com/
curl -vso /dev/null https://www.domain.com/page/1
What is going wrong? How do I debug this?
How can I rely on Cloudflare caching my stuff properly?
I mean, I am running a high traffic website there. If the landingpage cache falls flat, my servers are going to be hit with too much traffic.