• Resolved PthPndr

    (@pthpndr)


    According to the changelog starting with version 2.4.0 you can programmatically purge the cache for a single post. Does anyone have any idea on how to do this?

    I tried poking through the code but nothing stood out.

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author owaisalam

    (@owaisalam)

    Hi there!

    You can programmatically clear cache for a specific post using this WordPress action:

    do_action( ‘purge_post_cache’, $post_id );

    Replace $post_id with your actual post ID (e.g., 123).

    Example Usage

    // Clear cache for post ID 123
    do_action( ‘purge_post_cache’, 123 );

    You can add this to your theme’s functions.php or custom plugin.

    Hope this helps!

    Thread Starter PthPndr

    (@pthpndr)

    Thank you, I don’t know how I missed that.

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

You must be logged in to reply to this topic.