If you want to purge the cache created by the plugin:
<?php
$tag = substr(md5(__DIR__ . '/system/library/lscache'),0,4);
header("X-LiteSpeed-Purge:" . $tag);
If you want to purge the entire cache:
<?php
header("X-LiteSpeed-Purge:*");
To purge the cache only from CLI:
if (php_sapi_name() === 'cli') {
$path = dirname(__FILE__);
$tag = __DIR__ . '/wp-content/plugins/litespeed-cache/';
$tag = substr(md5($tag), -3) . '_';
header("X-LiteSpeed-Purge:" . $tag);
}else{
header('HTTP/1.0 403 Forbidden');
$contents = file_get_contents($path . '/403.shtml', TRUE);
exit($contents);
}
403.shtml
<!DOCTYPE html>
<html style="height:100%">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" >
<title> 403 Forbidden
</title></head>
<body style="color: #444; margin:0;font: normal 14px/20px Arial, Helvetica, sans-serif; height:100%; background-color: #fff;">
<div style="height:auto; min-height:100%; ">
<div style="text-align: center; width:800px; margin-left: -400px; position:absolute; top: 30%; left:50%;"><h1 style="margin:0; font-size:150px; line-height:150px; font-weight:bold;">403</h1>
<h2 style="margin-top:20px;font-size: 30px;">Forbidden</h2>
<p>Access to this resource on the server is denied!</p>
</div>
</div>
</body>
</html>
Copy the code from above into a blank PHP file and place it in document_root.