Closed lhoucinecherif closed 2 years ago
There seems to be something in OpenLiteSpeed which causes this to not function, while the purge calls do work, they purge hashes in OpenLiteSpeed that don't correspond to what the actual page has.
It's being investigated!
@lhoucinecherif apparently it's expected behavior at this moment, that OLS does not support purging by URL, but only via tags.
To be able to purge, you can then either set a tag (using lstags:
middleware) for your routes, this can be based on the actual URI like a tag such as /
, /path1
, when you then purge /
or /path1
even /path1,/path2
it will purge the tags corresponding to that.
Personally, I'd probably generate a shortened checksum of the path instead, so instead of /path1
use a sha256 and using the first 6-10 characters or so (like git does for commit hashes) It's easy and consistent to calculate, and you always then work with ASCII, so no "surprises".
I'll update the README accordingly, and then let's hope OLS will bring URL purge eventually!
Hi, Am using OpenLitespeed 1.6.21 (lsphp74) in the ols-docker-env image , LSCache::purgeAll() and LSCache::purge('*') seems to be the only working functions ! When using LSCache::purge('/') or LSCache::purge('/path1,/path2,/path3') or even LSCache::purgeItems(['/path1','/path2','/path3']) nothing happens !! the pages are still served from the cache