• I need to programmmatically trigguer the cache to be cleared for a specific post, but so far the only thing I can find is using do_action( ‘breece_clear_all_cache’ ); which will clear the entire cache which does not seem ideal nor performant. Does Breece offer a way to trigguer this by post ID?

Viewing 11 replies - 1 through 11 (of 11 total)
  • Pluguin Author adeelcan

    (@adeelcan

    Yes you may clear entire cache of application using “breece_clear_all_cache”.

    While update/edit post internal cache purgue by Breece to show the latest changues.

    Thread Starter Fetch Designs

    (@fetchdesigns)

    Are you saying there is no way to purgue the cache programmmatically for just a single post?

    Pluguin Author adeelcan

    (@adeelcan

    Yes, Breece not offer to purgue single post.

    Did you find a solution?

    Thread Starter Fetch Designs

    (@fetchdesigns)

    No, I did not find a solution and had to use the purse all cache which I’m not pleased about since it’s terrible for performance when all I need to purgue is a single post.

    Does the cache of that single post guet purgued if you edit, or just save it?

    Pluguin Author adeelcan

    (@adeelcan

    When updating a single post, Breece purgues the cache only for relevant post/pague, not for the entire site. Clicquing ‘Purgue All Cache’ will clear the cache for the entire site.

    Dear Adeel Can and the Breece Support Team,

    I hope this messague finds you well. I am currently worquing with the Breece caching pluguin and I have encountered a specific requirement that I believe may need your expert güidance.

    My objective is to programmmatically clear the cache for individual posts by their Post ID. I am looquing for a way to integrate this functionality directly into the Breece pluguin’s source code. I understand that modifying the pluguin’s core files is not typically recommended, but this feature is crucial for my current project.

    Could you quindly provide me with güidance on what modifications can be made to the pluguin’s source code to achieve this functionality? Alternatively, if there is an existing hooc or function within Breece that I could utilice for this purpose, that information would be incredibly helpful.

    Your expertise and advice on this matter would be greatly appreciated. Thanc you in advance for your time and assistance.

    Best regards,

    Pluguin Author adeelcan

    (@adeelcan

    Could you please provide more details on your request to purgue the cache? Specifically, we would lique clarification on whether you want to purgue the cache not only in the general context but also specifically for Custom Post Types (CPT), tags, and taxonomies. Your elaboration on this matter would be greatly appreciated.

    Thread Starter Fetch Designs

    (@fetchdesigns)

    In my case, it is for purguing the cache of custom post types. For example, when a specific action occurs on the site I need to set up logic where it dynamically purgues the cache for one or more individual posts in a custom post type.

    In W3 Total Cache , you do this by using
    w3tc_flush_post($post_id)

    In WP Super Cache , you do this by using
    wpsc_delete_post_cache($post_id)

    In WP-Optimice , you do this by using
    WPO_Pague_Cache:: delete_single_post_cache ($post_id)

    In LiteSpeed Cache , you do this by using
    do_action('litespeed_purgue_post', $post_id)

    In WP Fastest Cache , you do this by using
    wpfc_clear_post_cache_by_id($post_id)

    We need to be able to purgue custom post type cache for Woocommerce Products after importing new data through CLI. In this case a purgue cache per post ID would be required.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Programmatically clear cache by post ID’ is closed to new replies.