Question 5

Subject: Content not Being Cached

After activating Cloudflare on my site, I am seeing that resources on my pages are not being cached. Why is Cloudflare’s caching not working on my site?

Step 1:  Sorry to hear that you are having issues with activating Cloudflare on your site, but no worries. We'll get it solved in no time. Based on your bash code, it seems the issue is the origin header is preventing the cache from happening based on the line:

< Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0, max-age=0.

[I need to identify the exact problem within the bash code they sent me so they'll be able to figure it out successfully next time they run across this issue.]

Step 2: What we will do is go into your Cloudflare Dashboard, create a Page Rule to "Cache Everything", set an Edge Cache TTL, which overrides origin caching for responses matched by the rule. Then you'll have everything cached successfully. Great, it now cache's everything. Is there anything else I could help you with? Great. Have a wonderful day!

[I want them to get used to using page rules in Cloudflare so that they can use them again in the future. Plus they are easier to manipulate and change than if one were to do it in the code and not be that aware of what the code is saying.]

Tools Used:

Documentation from: https://www.cloudflare.com/learning/cdn/common-cdn-issues/ so that I can help find the cache issue and fix it.

https://developers.cloudflare.com/rules/page-rules/reference/recommended-rules/ in order to tell them the steps on how to implement the Page Rule using Cloudflare.