Subject: Content not Being Cached

After activating Cloudflare on my site, I am seeing that resources on my pages are not being cached on Cloudflare. If I run a cURL to see the headers i see the following: Why is Cloudflare’s caching not working on my site? How do I make Cloudflare cache my site?

Initial Bounce to the Customer

Hello [Customer Name],

Good day! I am Jane from the Cloudflare Support team, and I am glad to assist you with this case.

Thanks for providing the HTTP messages, which is really helpful!

From this message, we noticed the Cache-Control header in 200 OK response is set to max-age=0. Cloudflare respects the cache headers of origin web server, so if the Cache-Control header is set to max-age=0, Cloudflare does not cache. Please refer to the article below for more details:

  • Default cache behavior

  • If you want to enable Cloudflare Cache, please consider to use Edge Cache TTL cache rule to overrides the headers: Select Ignore cache-control header and use this TTL in Cache Rules settings.

    I hope this information can help. Please let me know if you encounter any issue when setting the Cache Rules, and I will be happy to help.

    Have a nice day!

    Best Regards,
    Jane Gang
    Cloudflare Support Engineer

    Return Home Page   Previous Question   Next Question