OLs version 1.7.14 lscache not working

#1
Hi,

The lscache module is not working with version 1.7.14 . I tested on ubuntu server and a directadmin server. It is simply not showing the headers

# bin/openlitespeed -v
LiteSpeed/1.7.14 Open
module versions:
modgzip 1.1
cache 1.62
modinspector 1.1
uploadprogress 1.1
mod_security 1.4
(built: Tue Sep 7 15:24:59 UTC 2021)
module versions:
modgzip 1.1
cache 1.62
modinspector 1.1
uploadprogress 1.1
mod_security 1.4


Cache global configurations

# tail -22 conf/httpd_config.conf
module cache {
internal 1
ls_enabled 1
storagePath $SERVER_ROOT/cachedata
checkPrivateCache 1
checkPublicCache 1
maxCacheObjSize 10000000
maxStaleAge 200
qsCache 1
reqCookieCache 1
respCookieCache 1
ignoreReqCacheCtrl 1
ignoreRespCacheCtrl 0
enableCache 1
expireInSeconds 3600
enablePrivateCache 0
privateExpireInSeconds 3600

}


Http headers on test

~$ curl -I http://foo.com/
HTTP/1.1 200 OK
etag: "35a5-619ce481-6e38b0;;;"
last-modified: Tue, 23 Nov 2021 12:54:25 GMT
content-type: text/html
content-length: 13733
accept-ranges: bytes
date: Wed, 24 Nov 2021 07:30:27 GMT
server: LiteSpeed
connection: Keep-Alive


I think it is a bug or am I missing any further configurations settings ?
 

Cold-Egg

Administrator
#2
Although the cache module is not the default value, it should still work. May I know if this is a PHP site? did you set any cache rules in rewrite or?
If you clean up the /usr/local/lsws/cachedata/priv folder, will you see any new cache file being generated?
 
#3
Although the cache module is not the default value, it should still work. May I know if this is a PHP site? did you set any cache rules in rewrite or?
If you clean up the /usr/local/lsws/cachedata/priv folder, will you see any new cache file being generated?
It is a plain html site for testing the cache . There is no rewrite rules thoug. There is no cache generated on the server cache folder . it is supposed to show the cache headers even if there is no cache , am I right ?
 
#5
i thought it will cache .html too by default . So was testing it on wrong way,. The cache is working fine with public and private cache for php file .
I can purge the public cache , I can't purge the private cache from server. Tested the following ,

Public Cache Purging :
The following will purge public cache but it won't purge private cache
# /usr/bin/curl --connect-timeout 10 -X PURGE https://foo.com/phpinfo.php
Processed PURGE by "foo.com:443/phpinfo.php".


Private Cache Purge:

I used the documentation and set header for cache purge as follows, but it won't purge any private cache, used the following command

# /usr/bin/curl --connect-timeout 10 -X PURGE -H "X-LiteSpeed-Purge: private, *" -H "X-LiteSpeed-Purge: *" https://foo.com/phpinfo.php
Processed PURGE by "foo.com:443/phpinfo.php".
 
#7
Got it, seems like a bug, will forward this to the team. :)
If so one more request . The cache module doesn't obey suexec . If we use private cache and the domain cache to vh_root/lscache , those cache folder will be created with the ols user instead of the vhost user. So the vhost user can't remove those cache files to control his private cache
 
Top