• Hi!
    First of all, great work with the plugin. Now to the problem, I have to manually purge CF cache once I publish a post/page because it doesn’t appear on my website’s homepage. Is there something I’m missing?

    I use this plugin with WP Rocket (fallback cache enabled along with WP rocket as said in the recommended settings).

    The rest are default settings except for Add browser caching rules for static assets turned ‘enable’.

    The log file doesn’t indicate any error.

    • This topic was modified 3 years, 4 months ago by romant14.

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

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

    (@isaumya)

    When you update the post the plugin automatically purge the post page along with related post pages. Can you make sure page caching is disabled in WP Rocket?

    Can you also make sure this option is enabled under the third party tab for WP Rocket: https://i.imgur.com/2hybcvT.png

    If you still face the problem, enable the “Log Mode” and under the other tab, set log verbosity to high. Then after you update a post check the log where you can see all the URLs the plugin is purging.

    Thread Starter romant14

    (@romant14)

    Hi! Thanks for the quick reply. WP Rocket has no option to disable it. So, as you said, I have already disabled WP rocket from the third part tab.

    The fallback cache is on, and I do see the advanced-cache file generated by the plugin (after I disable WP rocket). I’ll be looking in the logs for now.

    Plugin Contributor iSaumya

    (@isaumya)

    ok. Keep me posted about what you find.

    Thread Starter romant14

    (@romant14)

    Hi!
    So, here’s the update.
    When I post a new post, the post appears automatically on the other associated pages except for the homepage.
    In the logs the post with the ID also trigger purge cache multiple times, but I’m not able to understand what it is all about. Here’s the part:

    [2021-07-29 21:23:31] [cache_controller::purge_cache_on_post_edit] Purge Cloudflare cache for only post id 27111 and related contents - Fired action: clean_post_cache
    [2021-07-29 21:23:31] [cache_controller::purge_cache_when_post_is_published] Purge Cloudflare cache for only post id 27111 and related contents - Fired action: transition_post_status
    [2021-07-29 21:23:31] [cache_controller::purge_cache_on_post_edit] Purge Cloudflare cache for only post id 27111 and related contents - Fired action: edit_post
    [2021-07-29 21:23:33] [html_cache::add_current_url_to_cache] The URL https://www.thephonetalks.com/wp-json/wp/v2/posts/27111?_locale=user cannot be cached due to caching rules.
    [2021-07-29 21:23:33] [cache_controller::wp_rocket_hooks] Purge whole Cloudflare cache (fired action: after_rocket_clean_files)
    [2021-07-29 21:23:33] [cache_controller::wp_rocket_hooks] Purge whole Cloudflare cache (fired action: after_rocket_clean_files)
    [2021-07-29 21:23:33] [cache_controller::wp_rocket_hooks] Purge whole Cloudflare cache (fired action: after_rocket_clean_post)
    [2021-07-29 21:23:33] [cache_controller::purge_cache_on_post_edit] Purge Cloudflare cache for only post id 27111 and related contents - Fired action: clean_post_cache
    [2021-07-29 21:23:33] [cache_controller::purge_cache_on_post_edit] Purge Cloudflare cache for only post id 27111 and related contents - Fired action: edit_post
    [2021-07-29 21:23:51] [html_cache::add_current_url_to_cache] Created the file /home/517252.cloudwaysapps.com/zpygfjyjcr/public_html/wp-content/wp-cloudflare-super-page-cache/www.thephonetalks.com/cached_html_pages/d5c61149218a3745651c3b499513141029e18386.tmp for the URL https://www.thephonetalks.com/xiaomi-beats-apple-q2-2021-rankings/
    [2021-07-29 21:23:57] [html_cache::add_current_url_to_cache] Created the file /home/517252.cloudwaysapps.com/zpygfjyjcr/public_html/wp-content/wp-cloudflare-super-page-cache/www.thephonetalks.com/cached_html_pages/bc768538a629d4a00bbc2fd257f3a87be8498f68.tmp for the URL https://www.thephonetalks.com/xiaomi-mi-a3-a3-lite-sd-730-675-leaked
    [2021-07-29 21:23:57] [html_cache::add_current_url_to_cache] The URL https://www.thephonetalks.com/wp-json/wp/v2/tags?per_page=20&orderby=count&order=desc&_fields=id%2Cname%2Ccount&search=Vivo%20Ap&_locale=user cannot be cached due to caching rules.
    [2021-07-29 21:23:57] [html_cache::add_current_url_to_cache] The URL https://www.thephonetalks.com/wp-json/wp/v2/tags?_locale=user cannot be cached due to caching rules.
    [2021-07-29 21:23:58] [html_cache::add_current_url_to_cache] The URL https://www.thephonetalks.com/wp-json/wp/v2/tags?per_page=20&orderby=count&order=desc&_fields=id%2Cname%2Ccount&search=Vivo&_locale=user cannot be cached due to caching rules.
    [2021-07-29 21:23:58] [html_cache::add_current_url_to_cache] Created the file /home/517252.cloudwaysapps.com/zpygfjyjcr/public_html/wp-content/wp-cloudflare-super-page-cache/www.thephonetalks.com/cached_html_pages/06f62af16cc303a0cd8fadf6fcdd6385afffb636.tmp for the URL https://www.thephonetalks.com/xiaomi-mi-a3-a3-lite-sd-730-675-leaked/
    [2021-07-29 21:23:59] [html_cache::add_current_url_to_cache] The URL https://www.thephonetalks.com/wp-json/wp/v2/tags?per_page=20&orderby=count&order=desc&_fields=id%2Cname%2Ccount&search=Vivo&_locale=user cannot be cached due to caching rules.
    [2021-07-29 21:23:59] [html_cache::add_current_url_to_cache] The URL https://www.thephonetalks.com/wp-json/wp/v2/tags?per_page=20&orderby=count&order=desc&_fields=id%2Cname%2Ccount&search=Apple&_locale=user cannot be cached due to caching rules.
    [2021-07-29 21:24:01] [html_cache::add_current_url_to_cache] Created the file /home/517252.cloudwaysapps.com/zpygfjyjcr/public_html/wp-content/wp-cloudflare-super-page-cache/www.thephonetalks.com/cached_html_pages/aea58fbfd339643d3a489d9ccce19e0fa32fe05d.tmp for the URL https://www.thephonetalks.com/fiil-t1-lite-review-tws-comparison/
    [2021-07-29 21:24:01] [html_cache::add_current_url_to_cache] Created the file /home/517252.cloudwaysapps.com/zpygfjyjcr/public_html/wp-content/wp-cloudflare-super-page-cache/www.thephonetalks.com/cached_html_pages/95b7b97fd3e59c90ce46f8e6aaf54c588669c2ab.tmp for the URL https://www.thephonetalks.com/
    [2021-07-29 21:24:02] [html_cache::add_current_url_to_cache] Created the file /home/517252.cloudwaysapps.com/zpygfjyjcr/public_html/wp-content/wp-cloudflare-super-page-cache/www.thephonetalks.com/cached_html_pages/c19fe988196d2d871ede5c3f29493bc26d386649.tmp for the URL https://www.thephonetalks.com/feed
    [2021-07-29 21:24:03] [html_cache::add_current_url_to_cache] The URL https://www.thephonetalks.com/feeds cannot be cached because it returns 404.

    The same thing is created multiple times.
    When I bypass CF super cache, the post does show on the front page.

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

    (@romant14)

    Let me know if you need more information from the log file

    Plugin Contributor iSaumya

    (@isaumya)

    Hey,
    Can you download this build of the plugin and see if it works or not?

    • This reply was modified 3 years, 3 months ago by iSaumya. Reason: Updated build download URL
    Thread Starter romant14

    (@romant14)

    Sure, let me check.

    Thread Starter romant14

    (@romant14)

    Okay, so this time, I have also disabled WP rocket completely. Installed the plugin which you sent. And I’m using the default plugin settings (even though I have Varnish, Redis Object cache, and OPcache running).

    Still, the homepage was not updated automatically. Here’s the log generated:

    [2021-08-03 07:02:07] [cloudflare::page_cache_test] Start test to https://www.thephonetalks.com with headers Array
    (
        [timeout] => 10
        [sslverify] => 
        [user-agent] => Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0
        [headers] => Array
            (
                [Accept] => text/html
            )
    
    )
    
    [2021-08-03 07:02:07] [cloudflare::page_cache_test] Response Headers: Requests_Utility_CaseInsensitiveDictionary::__set_state(array(
       'data' => 
      array (
        'date' => 'Tue, 03 Aug 2021 07:02:07 GMT',
        'content-type' => 'text/html; charset=UTF-8',
        'link' => '<https://www.thephonetalks.com/wp-json/>; rel="https://api.w.org/", <https://www.thephonetalks.com/wp-json/wp/v2/pages/7>; rel="alternate"; type="application/json"',
        'cache-control' => 's-maxage=31536000, max-age=60, max-age=0',
        'x-wp-cf-super-cache' => 'cache',
        'x-wp-cf-super-cache-active' => '1',
        'x-wp-cf-super-cache-cache-control' => 's-maxage=31536000, max-age=60',
        'x-wp-cf-super-cache-cookies-bypass' => 'swfpc-feature-not-enabled',
        'vary' => 'Accept-Encoding',
        'expires' => 'Tue, 03 Aug 2021 06:48:07 GMT',
        'x-cache' => 'HIT',
        'access-control-allow-origin' => '*',
        'cf-cache-status' => 'EXPIRED',
        'last-modified' => 'Sat, 31 Jul 2021 11:17:55 GMT',
        'expect-ct' => 'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"',
        'report-to' => '{"endpoints":[{"url":"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=hlTMt0sOICN3AUdhg6N5xzlnx8RY8wCnMZ59%2FoNzet5sAavkDi37n8QA0%2FoP4NYbeaOyrZfIdDvStQhmn9wcv61G9od7ztSNi%2FiW2nZT5Hvbd1vb2zZKR2Fs33BvjeVxw4jlqSBxaRg%3D"}],"group":"cf-nel","max_age":604800}',
        'nel' => '{"report_to":"cf-nel","max_age":604800}',
        'strict-transport-security' => 'max-age=15552000; preload',
        'x-content-type-options' => 'nosniff',
        'server' => 'cloudflare',
        'cf-ray' => '678dadb63fa63bbc-CDG',
        'content-encoding' => 'gzip',
        'alt-svc' => 'h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400, h3=":443"; ma=86400',
      ),
    ))
    [2021-08-03 07:22:19] [cache_controller::purge_cache_queue_write] queue file not exist
    [2021-08-03 07:22:19] [cache_controller::purge_cache_on_post_edit] Purge Cloudflare cache for only post id 22356 and related contents - Fired action: clean_post_cache
    [2021-08-03 07:26:36] [cache_controller::purge_cache_on_post_edit] Purge Cloudflare cache for only post id 27232 and related contents - Fired action: clean_post_cache
    [2021-08-03 07:26:36] [cache_controller::purge_cache_when_post_is_published] Purge Cloudflare cache for only post id 27232 and related contents - Fired action: transition_post_status
    [2021-08-03 07:26:36] [cache_controller::purge_cache_on_post_edit] Purge Cloudflare cache for only post id 27232 and related contents - Fired action: edit_post
    [2021-08-03 07:26:38] [cache_controller::purge_cache_on_post_edit] Purge Cloudflare cache for only post id 27232 and related contents - Fired action: clean_post_cache
    [2021-08-03 07:26:38] [cache_controller::purge_cache_on_post_edit] Purge Cloudflare cache for only post id 27232 and related contents - Fired action: edit_post
    Plugin Contributor iSaumya

    (@isaumya)

    even though I have Varnish, Redis Object cache, and OPcache running

    – If you are using varnish, have you added the varnish port details to the plugin settings to ensure that the varnish cache also gets cleared?

    Also can you add the line define('SWCFPC_HOME_PAGE_SHOWS_POSTS', true); to your WP Config and see that works?

    Thread Starter romant14

    (@romant14)

    I use CLoudways Varnish and see that the plugin has the option of it as well. Will I still have to set the port as well (not the default ones) to use Varnish. Previously, I had the options for OPcache, Varnish, and Redis Cache purge cache turned on, and still, it wouldn’t work.

    Plugin Contributor iSaumya

    (@isaumya)

    Have you added define('SWCFPC_HOME_PAGE_SHOWS_POSTS', true); to wp-config.php and then checked?

    Thread Starter romant14

    (@romant14)

    Yes.

    View post on imgur.com


    added in wp-config.php
    Still no success.
    This is the homepage.
    I just wrote a post that should have been shown in the Latest News section but is not showing.

    Plugin Contributor iSaumya

    (@isaumya)

    Hmm… Can you set the Log Verbosity to High in the plugin settings Others tab. After that update a Post and check the log. Then you will be able to see the list of URLs it is purging on the post update. Share that log here and check if the home page URL is in that list.

    Thread Starter romant14

    (@romant14)

    Sure.

    Thread Starter romant14

    (@romant14)

    So, here’s the log, it does has the post ID in it which I recently published/updated. But I don’t see the homepage URL in it.

    [2021-08-03 11:12:47] [cache_controller::purge_cache_on_post_edit] Purge Cloudflare cache for only post id 27236 and related contents - Fired action: clean_post_cache
    [2021-08-03 11:12:47] [html_cache::add_current_url_to_cache] The URL https://www.thephonetalks.com/wp-json/rankmath/v1/updateMeta?_locale=user cannot be cached due to caching rules.
    [2021-08-03 11:12:47] [cache_controller::purge_cache_on_post_edit] Purge Cloudflare cache for only post id 27236 and related contents - Fired action: edit_post
    [2021-08-03 11:12:48] [html_cache::add_current_url_to_cache] The URL https://www.thephonetalks.com/wp-json/wp/v2/posts/27236?_locale=user cannot be cached due to caching rules.
    [2021-08-03 11:12:48] [cache_controller::wp_rocket_hooks] Purge whole Cloudflare cache (fired action: after_rocket_clean_files)
    [2021-08-03 11:12:48] [cache_controller::wp_rocket_hooks] Purge whole Cloudflare cache (fired action: after_rocket_clean_files)
    [2021-08-03 11:12:48] [cache_controller::wp_rocket_hooks] Purge whole Cloudflare cache (fired action: after_rocket_clean_post)
    [2021-08-03 11:12:48] [cache_controller::purge_cache_on_post_edit] Purge Cloudflare cache for only post id 27236 and related contents - Fired action: clean_post_cache
    [2021-08-03 11:12:48] [cache_controller::purge_cache_on_post_edit] Purge Cloudflare cache for only post id 27236 and related contents - Fired action: edit_post
Viewing 15 replies - 1 through 15 (of 30 total)
  • The topic ‘Main Page Doesn’t Update When Publish a Page or Post’ is closed to new replies.