From the new documentation, it looks to be
do_action( 'litespeed_purge_post', 'post_id' );
From my testing, the only problem is it seems to purge the whole cache rather than the specified post ID.
It would be good if you can confirm it’s not just me.
Thanks @luminsol pointing me to the new documentation.
do_action( 'litespeed_purge_post', ( $_REQUEST['post_id'] ));
did it for me. In my case it does what’s promised and only purges the specific post.
Thanks for confirming @sebastianulbert.
I managed to track down the issue. If you have Auto Purge Rules For Publish/Update enabled, it will purge all those pages as well.
They should really document that this is a side effect of the litespeed_purge_post API. Looking at the documentation alone, you would think it would ONLY purge the single post ID.
Hope this helps someone in the future!
Hi
it doesn’t seem to work in my case
do_action( 'litespeed_purge_post', $parent_id );
It does not purge the post defined by its id.
Worth to notice that the post is a custom post type, which might be the problem.
(I have applied pure ALL for now, which is super overkill ./ )
-
This reply was modified 5 years, 10 months ago by
2046.