• Resolved TimothyDalton

    (@timothydalton)


    Greetings authors, first of all thank you for this great plugin.

    I’m keen to learn how this plugin will help me on top of the rules which I have set up in cloudflare. By just setting up

    my-website.com/* Cache Level:?Cache EverythingEnabled

    I would expect that everything will be a cache hit in cloudflare. This does actually work but not for any HTML, i.e. https://my-website.com/wp-content/plugins/wp-cloudflare-page-cache/assets/testcache.html – why?

    However, once I activate this plugin, it does also cache the html pages. Could you elaborate why and how this works? I read in the FAQ that it caches locally on the server and also cloudflare. Why is this needed? Happy to learn from you guys!

    Thanks and cheers!

Viewing 6 replies - 1 through 6 (of 6 total)
  • 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.

    Thread Starter TimothyDalton

    (@timothydalton)

    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.

    Thread Starter TimothyDalton

    (@timothydalton)

    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

    https://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.

    Thread Starter TimothyDalton

    (@timothydalton)

    Amazing, thank you @isaumya – I really appreciate this consulting. Indeed this works as expected now.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘High Level Functionality’ is closed to new replies.