Plugin Contributor
iSaumya
(@isaumya)
Hi @timothydalton,
If you check the plugin description page, this is already explained there in details. When setting up this plugin you need to make sure that you do not have any existing page rule that modifies cache behavior. If you have delete them before setting up this plugin.
When you setup this plugin it will auto create a Cache Everything page rule for your website. The goal of this plugin is to cache your webpages at the Cloudflare CDN level. So, when a user request for any pages, instead of requesting the page from the origin server, if it is already cached at Cloudflare CDN level, then that cached pages will be served to the users making the page load time super quick.
The disk level fallback cache is an optional and additional layer of disk level page caching for the situation when the page is not cached at Cloudflare CDN or has been expired form the CDN cache then the origin server will provide the page HTML from the disk level cache instead of executing full PHP codes to generate the page response.
Many thanks for explaining, it now makes sense @isaumya – one thing I noticed was that when the plugin applies the rule, it uses the website url set in wordpress which includes https://subdomain.domain.com – however I had to change this in cloudflare to use subdomain.domain.com to make it work.
Plugin Contributor
iSaumya
(@isaumya)
Hi @timothydalton,
It is quite important to have the full URL in the page rule including https:// to ensure that Cloudflare does not try to cache requests for other protocol types. Cause if your website is accessed with HTTP then it should auto redirect to HTTPS and this rule should not cause any issues.
Hi @isaumya – thanks for explaining that. I’m slowly getting my head wrapped around. Once I set it to https in cloudflare then the cache isn’t hit which I don’t understand yet, without works just fine.
My first page rule currently is
http://www.domain.com/*
Forwarding URL (Status Code: 301 – Permanent Redirect, Url: https://domain.com/$1)
And my second page rule currently is
domain.com/*
Cache Level: Cache Everything
As soon as I add “https://” to the second rule, it doesn’t seem to work anymore. The host server doesn’t have a certificate set up, I’m doing all of that in cloudflare directly.
Do you have any ideas what I could be doing wrong?
Cheerio, Tim
Plugin Contributor
iSaumya
(@isaumya)
Hi @timothydalton,
If you do not have any SSL at the host origin server, inside the Cloudflare SSL section you should select Flexible option. Alternatively if you have a self-sign certificate in your origin server then you can select the Full option. Screenshot: https://i.imgur.com/cLEy2xR.jpeg
Selecting the correct SSL option inside Cloudflare dashboard will resolve your HTTPS related issues.
Amazing, thank you @isaumya – I really appreciate this consulting. Indeed this works as expected now.