Wordpress LScache Plugin: Purge all caches for single product page programmatically?
Last Updated on: Wed, 15 Apr 2026 00:00:02 Hello, Can someone please help me, Im trying to flush page cache for a single product with this code: if(!get_the_content()) $generate_content = Some Content $update_product_content = array( ID=>$product_page_id, post_content=>$generate_content ) wp_update_post($update_product_content) if(defined(LSCWP_V)) do_action(litespeed_purge_url, get_the_permalink()) //FLUSH CACHE LiteSpeed But nothings happening on the front-end after refreshing the page in the browser ? I still see cached version of the page, while in the back-end I see message, that cache for the url was succesfully purged. I have tried also to use this code: if(defined(LSCWP_V)) do_action(litespeed_purge_post, $product_page_id) But with this hook, I dont even see a message in the back-end, that cache for the page was purged. Im using latest version of LiteSpeed Plugin, WordPress and Woocommerce with Memcache Object Caching & OPcache. please try full URL path e.g. do_action( litespeed_purge_url, https://domain.com/2021/08/04/test/ ) and dont forget the that wraps URL. ??update ?? I think this ought do it do_action(litespeed_purge_url, set_url_scheme( get_site_url() ) . get_the_permalink() )
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference