Hi @ntoum,
Yes you can, if you want to purge a single page, you can use LiteSpeed_Cache::get_instance()->purge_all() to purge all, or LiteSpeed_Cache::get_instance()->purge_single_post($post_id) to purge one post in v1.1.2.2.
Please note, in v1.1.3, we will change the structure and add a new API class, at that time, you can use a easier and simpler way to do this.
If your script is not loaded from WP, you can follow this wiki: https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:developer_guide:response_headers
send the purge header manually to server directly.
Thread Starter
ntoum
(@ntoum)
Hello,
Thank you very much for your answer! I tried it, and seems to working. If i will have any problem, i’ll write it here.
By the way, is there any documantion with all php methods that i can use? My script is loaded from WP (actually calling wp-load.php).
Hi, @ntoum
We do have this wiki that may help, but it’s slightly out-of-date, and is very likely to be changing with the next release. You can take a look for reference, but I’d hold off doing any major development with it until we get it freshly-updated (should be soon!):
https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:api
Hope this helps!
Lisa @ LiteSpeed
Thread Starter
ntoum
(@ntoum)
Hello,
Nice!! Okey, i will use only the method above, because i am updating daily a lot of products through script, and i am waiting for your update for further major development.
Thank you very much for your help!!
Our pleasure. Happy caching!