API ? purge_post clears entire cache?




Wordpress LScache Plugin: API ? purge_post clears entire cache?

Last Updated on: Wed, 15 Apr 2026 00:00:02
Hi guys, According to your documentation, purge_post should only clear the post ID supplied. LiteSpeed_Cache_API::purge_post($id) Purges a single post by id. However, Im finding it will clear the entire cache. Heres the purge log. The post ID Im passing in is 11907, which appears in the log ? but I seeing its clearing a lot more. Can anyone help make sense of the log? 08/20/19 14:25:58.936 [IP Removed:52121 1 TbL] ------GET HTTP/1.1 (HTTPS) /webhook/clear-cache.php 08/20/19 14:25:58.936 [IP Removed:52121 1 TbL] Query String: 08/20/19 14:25:58.936 [IP Removed:52121 1 TbL] X-LiteSpeed-Purge: public,stale,602_Po.11907,602_URL.bf1d939cbc9215ad3275393cf5fbb9c3,602_W.recent-posts-9,602_A.1,602_F,602_H,602_PGS,602_PGSRP,602_D.201805,602_REST => LSC->send_headers()@680 => WP_Hook->apply_filters()@286 => WP_Hook->do_action()@310 => /home/user/public_html/wp/wp-includes/load.php@465 Hi, Perhaps this wiki might help Basically , when you purge a post , like when edit it or publish it. the page related to it , like category page , home/front page (if it shows in there) , recent widget ?etc are probably also purged. Also please try uncheck some of these auto-purge Best regards, Thank you for your response. I was unaware that the API functions behaved that way. Unchecking all the auto-purge settings fixed my problem. It would be nice if this was documented in the API, or the API had a direct function which doesnt trigger the auto-purge rules. Hi, That was the point for purge function , if related page didnt purge , people might think purge doesnt work at all. Thanks for your advice , we will update our documentation accordingly Best regards, I totally understand the reasons why it has been done that way. I wrongly assumed the API was a way to allow finer grain control. Thank you for listening! Closing this issue.



LiteCache Rush: Speed comes from using less, not from doing it faster



Reference