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' );
-
This reply was modified 5 years, 12 months ago by
Justin Dixon.