• Resolved Anonymous User 11187416

    (@anonymized-11187416)


    Right, this may be a “feature” rather than a “bug” but I think it needs addressing.

    I am/was having an issue with one page only showing the updated version to logged-in users, not everyone else. I did not want to clear the entire cache but just the page in question.

    So I used the “clear cache” button in the right panel during editing that post. Only it cleared the entire cache. And I’m still seeing the old version as a “normal” user.

    I am using Cloudflare but I cleared the cache in Cloudflare as well as HB to be sure.

    Either way, please can you make the “clear cache” button in page/post editor only clear that specific page’s cache?

    Thanks!

    Edit: After clearing the caches again and doing a minor post edit I finally have the updated version showing to all users. But I would prefer not to have to do a minor update just to clear that post’s cache. Thanks.

    • This topic was modified 3 years, 2 months ago by Anonymous User 11187416.

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

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Support Imran – WPMU DEV Support

    (@wpmudev-support9)

    Hello @martin-oxby !

    I trust you’re doing well!

    I was able to replicate this behaviour on my site and when reporting this to the Hummingbird team, they’ve shared a snippet that seems to be fixing this. Can you try it on your site as well?

    add_action( 'delete_transient_wphb-processing', function(){
    remove_all_actions( 'wphb_clear_page_cache', 10 );
    } );

    You can add the code to the end of your theme’s functions.php file (if you’re using a child theme, or copy this code to a separate .php file and place it in wp-content/mu-plugins – the file name doesn’t matter as long as the extension is .php. Please don’t forget to add the opening <?php at the beginning of the file in this case.

    Best regards,
    Pawel

    Thread Starter Anonymous User 11187416

    (@anonymized-11187416)

    Okay I will do – so when I do this, the button in the post editor should just clear that page, yes? (before I accidentally empty the whole cache again!).

    Thanks!

    Plugin Support Nebu John – WPMU DEV Support

    (@wpmudevsupport14)

    Hi @martin-oxby,

    The provided code fixes an issue with the cache being deleted.

    If the post ID is set, the button mentioned in your issue tries to clear cache for that page or post with all the related taxonomies (tags, category and author pages).

    I hope the code snippet provided fix the issue that you have noticed.

    Kind Regards,
    Nebu John

    Thread Starter Anonymous User 11187416

    (@anonymized-11187416)

    Hiya,

    I added the code and I’ll try it out later when I’m not making regular changes to posts. I think it worked earlier but I had the “clear entire cache on post update” set. I’ve now disabled this – as it won’t be necessary if I can clear individual posts going forward.

    I’ll reply either later today or Monday so we can see if this thread can be closed.

    Thank you for sharing this.

    Thread Starter Anonymous User 11187416

    (@anonymized-11187416)

    Yep I can confirm the whole cache did not clear with the new snippet of code.

    Maybe that just needs pushing into the next Hummingbird update, then?

    Thanks again!

    Plugin Support Dimitris – WPMU DEV Support

    (@wpmudev-support6)

    Hello @martin-oxby

    I really appreciate the cooperation and update here. I’ve already shared this with our developers so we can provide a proper fix in the plugin.

    Thank you,
    Dimitris

    Thread Starter Anonymous User 11187416

    (@anonymized-11187416)

    However – what appears to have happened is that the whole cache is now cleared on post update even with that option disabled. Anything I can test for you?

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @martin-oxby

    I hope you are doing well.

    I tested the script on my end but I couldn’t notice issues when updating the post, can you let us know if you are using a page builder like Elementor or Divi and we can try to replicate again?

    Best Regards
    Patrick Freitas

    Thread Starter Anonymous User 11187416

    (@anonymized-11187416)

    No page builder, I’m just using Classic Editor. I have to make changes to at least one, if not more posts tomorrow so I’ll let you know how I get on ??

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @martin-oxby

    Thank you, please keep us posted.

    Best Regards
    Patrick Freitas

    Thread Starter Anonymous User 11187416

    (@anonymized-11187416)

    Okay, you can close this ticket no problems. Seems like it was just a timing issue of cache and other things coming back in-line. I’ve cleared an individual post’s cache and updated a couple of other posts and in neither case was the whole cache cleared.

    Thanks! And I look forward to this code snippet being brought into the full plugin.

    Thanks for your patience ??

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Delete Cache during Page Edit Clears Entire Cache’ is closed to new replies.