What is the correct rule to cache everything?

Hi,

My website is https://www.datanumen.com, which uses WordPress. I want to create a cache everything rule to cache not only the static images, javascript, css files, but also the dynamic web pages. Then I read the following articles:

  1. Caching Static HTML with WordPress/WooCommerce – Cloudflare Help Center
  2. The Ideal WP Rocket Settings For 2021 (updated for 3.9.0.5)

In 1, it said one should use https://www.datanumen.com
In 2, in the black box, it said one should use https://datanumen.com/, in the screenshot, it use http://datanumen.com/ and enable “Always use HTTPS”.
In the example showing in “Create Rule” box, it shows www.example.com/*, see below:

So I get totally confused on which rule should I use? Currently my website is using https, so currently I define the rule as www.datanumen.com/*, and then set “Cache Level” to “Cache Everything”, the “Always use HTTPS” setting is greyed so I cannot select, below is the configuration:

2021-07-15_9-15-27

Just wonder whether this is correct?

Neither of those articles will work well in your situation.

  1. The Cloudflare article requires a Business or Enterprise plan so you can bypass cache on cookies.
  2. The WP Rocket article didn’t show any rules for caching HTML (dynamic web pages)

The right way to “Cache Everything” in WordPress is to use APO:

1 Like

Thank you. I am using WP Rocket, based on their document at Is WP Rocket compatible with Cloudflare APO? - WP Rocket Knowledge Base. One should take different actions based on whether pages are dynamic(updated frequently) or static(updated infrequently). My site is static. So in the article, it suggest me to setup a Cache everything rule, do not use APO plugin and enable APO, and enable Cloudflare add-on.

I don’t recommend using Cache Everything for caching even static HTML content. It’s too easy to shoot into the foot. You plan subscriptions includes APO, so I recommend:

1 Like

@yevgen,

Thank you very much.

I want to try your suggestion as well as that from WP Rocket to see which works better. Just wonder after I make the changes. How long should I wait to see the result of the change? 24 hours later?

Should be effective in minutes if not seconds.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.