Clear All Caches Programmaticly




Wordpress LScache Plugin: Clear All Caches Programmaticly

Last Updated on: Wed, 15 Apr 2026 00:00:02
Hello, How to clear/remove existing cache in db programmaticly? Thank you. Hi, Could you please be a little bit of more specific ? what do you mean by cache in db ? Best regards, Hello, Thank you for your reply, I am developed a plugin for client, but Lightspeed cache keeps old pages even contents change? Then my clients tell me that the website isnt changed, because she is not aware of LSC exists there, and she wont be in the future. So I need to trigger LSC to clear old caches programmaticly whenever she changes contents which provided by my plugin. Thanks, Hi @akkara, Please check API here to help you purge cache when any content updated. https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:api#api Best, I saw those functions in source code, when I attempt to call LiteSpeed_Cache_API::purge_all() I see error of function/class doesnt exists . So my pluing run earlier than LSC. Which WP action do I need to use? Usually plugins run API after all plugins are loaded. Please try to run after or in after_setup_theme



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



Reference