• Resolved Crowe

    (@crowe)


    Hi, I’ve seen others ask about this exact problem, but none of the proposed solutions fit my circumstances. When I click “Test Cache” I get this error message:
    _____

    Page caching seems not working for both dynamic and static pages.

    Error on dynamic page (https://americancatholichistory.org): Cache status: DYNAMIC – The resource was not cached by default and your current Cloudflare caching configuration doesn’t instruct Cloudflare to cache the resource. Instead, the resource was requested from the origin web server.

    Error on static resource (https://americancatholichistory.org/wp-content/plugins/wp-cloudflare-page-cache/assets/testcache.html): Unable to find the Cache-Control response header.

    Please check if the page caching is working by yourself by surfing the website in incognito mode ’cause sometimes Cloudflare bypass the cache for cURL requests. Reload a page two or three times. If you see the response header cf-cache-status: HIT, the page caching is working well.
    _______

    I do not have the Cloudflare APO plugin installed, but it’s possible another plugin is causing a conflict. Please help!

    The page I need help with: [log in to see the link]

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Contributor iSaumya

    (@isaumya)

    It looks like the plugin has been set up correctly. But might be some setup issue in CF end. Can you share a screenshot of your CF account Page Rule section?

    Thread Starter Crowe

    (@crowe)

    Ok, I’m glad the plugin looks to be set up properly, here’s a screen grab of the CF Rules page: https://americancatholichistory.org/wp-content/uploads/2021/04/Screen-Shot-2021-04-29-at-9.27.30-AM.png

    Plugin Contributor iSaumya

    (@isaumya)

    Under the cache settings of CF, can you check if browser cache is set to “Respect Existing Header”?

    Also do you have any CF worker added?

    Thread Starter Crowe

    (@crowe)

    For some reason I don’t recall I changed that from “respect existing headers” to “6 months.” I think it was due to a previous caching arrangement i was trying to make work but didn’t work as well as I had hoped. I have switched that back to “respect…” Also, no, I have no CF workers added. Should I wait a while and check my page speeds again with that change? Or is there something else to check?

    Plugin Contributor iSaumya

    (@isaumya)

    Damn! I have overlooked the issue it was looking at my face all along. Sorry! The problem is that in your page rule your page rule was created with https:// instead of https:// that your site actually uses. So, that was the reason behind your problem.

    The reason it happened because inside your WP Admin > Settings > General you didn’t changed your sites URLs to HTTPs so the system getting the data from WP which is saying it’s on HTTP.

    Either update your settings and then disable enable page cache again or inside the CF edit the page rule to use https. I recommend the first option as that is the right ay to do. Currently the URL scheme you uses and what WP knows you are using are different which iwas causing this problem.

    Fix this and your issue will be resolved. Enjoy. ??

    Thread Starter Crowe

    (@crowe)

    Oh man. There are sooooo many tiny details involved in these website things, any one of which can mess it all up. Thanks so much for your help thus far.

    OK, so I did what you said, I deactivated this plugin and then reactivated it, and then I reenabled caching, but I’m still getting the same error when I click “test cache.” Is it a matter of waiting longer?

    Plugin Contributor iSaumya

    (@isaumya)

    Did you checked the page rule section in CF? Does it now have https? Send me a screenshot.

    Thread Starter Crowe

    (@crowe)

    Thread Starter Crowe

    (@crowe)

    Does it matter that my server is still running php 7.4? I haven’t updated it to 8.0 yet.

    Thread Starter Crowe

    (@crowe)

    OK, I don’t know what I did this time, but I once again disabled page cache and
    then enabled it and then hit “test cache” and this time it said it’s working properly.

    So I thank you once again for your help!

    Tom

    Thread Starter Crowe

    (@crowe)

    I’ll mark this as resolved. thanks!

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @crowe,
    I’m so happy to hear that. This plugin is PHP 8.0 ready but you can also use it in PHP 7.4

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Page caching seems not working for both dynamic and static pages’ is closed to new replies.