Clear private cache page from PHP




Wordpress LScache Plugin: Clear private cache page from PHP

Last Updated on: Wed, 15 Apr 2026 00:00:02
Hello, How would I clear a privately cached page for a user from litespeed? Thank you Hi @justin-dixon, you can purge private cache by tag on LiteSpeed Setting > Manage > Purge By... Tag, which you can find the tag on the bottom of the HTML source code. Hello @stanleylitespeed, I said PHP because I needed to clear a customers cache for a specific privately cached page programmatically after they change a setting on their account. If the cache of the page was not cleared it would not reflect the setting change. I have already found the solution though? To clear LiteSpeed you can use these HTTP headers. Then to add HTTP headers to WordPress you can see this stack overflow answer. So should look something like this function ff_clear_cache() header( X-LiteSpeed-Purge: private, ) //add this whenever you need cache cleared programmatically add_action( send_headers, ff_clear_cache )



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



Reference