• Resolved storyform

    (@storyform)


    Hi there,

    Thanks for creating the plugin, once I get it working I’ll be sure to donate.

    I was wondering if I could please have some help. I’ve tried stripping response cookies. Also tried going to the static testcache.html page and reloaded a few times on multiple machines and browser sessions. It seems that the log file refuses to download btw. If I go to https://storyform.com.au/wp-content/wp-cloudflare-super-page-cache/storyform.com.au/debug.log?cache_buster=xxxxxxxxx (Xs added by me as I wasn’t sure it was safe to post the cache_buster code) I get a 403 error. Also, if I delete the automatically created page rule I get a Cache status: Dynamic.

    Test cache error below.

    Thanks.

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

    Error on dynamic page (https://storyform.com.au): Cache status: BYPASS – Cloudflare has been instructed to not cache this asset. It has been served directly from the origin.

    Error on static resource (https://storyform.com.au/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.

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

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

    (@isaumya)

    Hi @storyform,
    More than happy to help you solve this issue. I can see that you are using a LiteSpeed server. Can you confirm that:
    1. Overwrite the cache-control header for WordPress's pages using web server rules is disabled under the Cache tab of the plugin settings.
    2. Also, disable Strip response cookies on pages that should be cached under the Cache tab of the plugin’s settings page and let me know once you have done it.
    3. Also, are you using the LiteSpeed caching plugin? If so, please ensure you disable all page caching option from that plugin.

    Let me know. ??

    • This reply was modified 4 years, 3 months ago by iSaumya. Reason: Added more clarity
    Thread Starter storyform

    (@storyform)

    Thanks so much for the help and response!

    1. Overwrite the cache-control header for WordPress’s pages using web server rules is disabled.

    I’ve asked my hosting provider to fix this.

    Strip response cookies on pages that should be cached

    This was already set to no.

    Also, are you using the LiteSpeed caching plugin? If so, please ensure you disable all page caching option from that plugin.

    I’m not using it, should I? LiteSpeed was installed and configured by my host.

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @storyform,

    I’ve asked my hosting provider to fix this.

    It’s nothing to do with your hosting provided. I mean inside the plugin settings under the cache tab. Please uncheck this option inside the plugin settings if enabled and purge the whole cache from the plugin.

    I’m not using it, should I? LiteSpeed was installed and configured by my host.

    – You don’t need to

    • This reply was modified 4 years, 3 months ago by iSaumya.
    Thread Starter storyform

    (@storyform)

    Hi thanks for the reply.

    Oops, I see what you mean. That first setting was already set to “no”.

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @storyform,
    Can you share a screenshot of the plugin’s cache tab settings? Also, provide a screenshot of your Cloudflare Page Rule section so that I can what page rules you have.

    The reason you are having this issue is when I checked your website I saw that the Cache-Control header of your home page holds value like this: no-store, no-cache, must-revalidate which is supposed to be this: s-max-age=604800, s-maxage=604800, max-age=60. I also don’t see any unnecessary cookies on your site header. Take a look: https://i.imgur.com/QbPAt3h.png

    Thread Starter storyform

    (@storyform)

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @storyform,
    Can you check the htaccess file of your site and show me what you got there?

    • This reply was modified 4 years, 3 months ago by iSaumya.
    Thread Starter storyform

    (@storyform)

    # BEGIN WordPress
    # The directives (lines) between “BEGIN WordPress” and “END WordPress” are
    # dynamically generated, and should only be modified via WordPress filters.
    # Any changes to the directives between these markers will be overwritten.
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress
    # BEGIN WP Cloudflare Super Page Cache
    # The directives (lines) between “BEGIN WP Cloudflare Super Page Cache” and “END WP Cloudflare Super Page Cache” are
    # dynamically generated, and should only be modified via WordPress filters.
    # Any changes to the directives between these markers will be overwritten.
    <IfModule mod_expires.c>
    ExpiresActive on
    ExpiresByType application/xml “access plus 0 seconds”
    </IfModule>
    <FilesMatch “robots\.txt”>
    <IfModule mod_headers.c>
    Header set Cache-Control “max-age=0, public”
    </IfModule>
    </FilesMatch>
    # END WP Cloudflare Super Page Cache

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @storyform,
    Can you just confirm that Development mode is disabled in your Cloudflare account?

    Plugin Contributor Salvatore Fresta

    (@salvatorefresta)

    Hi @storyform ,
    the test cache is correct. After a check on your website, this is the response:

    HTTP/2 200 
    date: Fri, 21 Aug 2020 15:10:08 GMT
    content-type: text/html; charset=UTF-8
    set-cookie: __cfduid=d6c3fe1aab08f1c46820e413421d1737b1598022607; expires=Sun, 20-Sep-20 15:10:07 GMT; path=/; domain=.storyform.com.au; HttpOnly; SameSite=Lax; Secure
    x-powered-by: PHP/7.3.21
    link: <https://storyform.com.au/index.php/wp-json/>; rel="https://api.w.org/"
    x-wp-cf-super-cache: cache
    x-wp-cf-super-cache-active: 1
    x-wp-cf-super-cache-cache-control: s-max-age=604800, s-maxage=604800, max-age=60
    set-cookie: PHPSESSID=4e1fd0bdd45d8097450cd2ea8aa1aea5; path=/; secure
    expires: Thu, 19 Nov 1981 08:52:00 GMT
    cache-control: no-store, no-cache, must-revalidate
    pragma: no-cache
    vary: Accept-Encoding
    x-turbo-charged-by: LiteSpeed
    cf-cache-status: BYPASS
    cf-request-id: 04b32afb130000cd3e3b8c7200000001
    expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
    server: cloudflare
    cf-ray: 5c654771bd4bcd3e-FCO

    As you can see, the cache-control value is not “s-max-age=604800, s-maxage=604800, max-age=60” as expected but “no-store, no-cache, must-revalidate” which tells to Cloudflare to BYPASS the cache.

    This happens when something is overwriting the cache-control (other plugins, web server settings, etc..).

    Now, you are using Litespeed Server, and you cannot use the option “Overwrite the cache-control header for WordPress’s pages using web server rules” if your Litespeed Server version is minor then 6.0RC1 (as I think).

    However I think that the cache-control value is overwritten by the Litespeed Server configuration so, if you don’t want to change its the settings, for cases like the your I recommend to enable the Worker mode (under Cache tab) which uses CF Worker instead of page rules to add the HTML pages in cache.

    Let me know if it works for you ??

    Thread Starter storyform

    (@storyform)

    Thank you! Worker mode worked.

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @storyform,
    This confirms that: the cache-control value is overwritten by the Litespeed Server configuration or some other plugin when you are using page rule mode. This is not a plugin issue.
    Thanks for the confirmation. ??

    Thread Starter storyform

    (@storyform)

    No worries, thanks for the help. Interestingly if LiteSpeed is disabled from plex or from the WordPress plugin cloud flare workers is still needed. I’ll see if litespeed can be completely disabled by my host.

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @storyform,
    Cloudflare worker is simply adding the proper cache-control headers to your pages which should be cached and also at the same time not caching the pages which are not supposed to be cached.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Cache status: BYPASS’ is closed to new replies.