Openlitespeed Cache Module

#1
Hi All,

I am running OLS 1.3.1 which has the "cache.so" module pre built;

I followed the follow: http://open.litespeedtech.com/mediawiki/index.php/Help:Modules:Cache

I then set the settings to:

enableCache 1
qsCache 1
reqCookieCache 1
respCookieCache 1
ignoreReqCacheCtrl 0
ignoreRespCacheCtrl 0
expireInSeconds 2000
maxStaleAge 1000
enablePrivateCache 1
privateExpireInSeconds 1000
storagePath cachedata

I don't seem to be able to see that the file was served from Cache - in response header;

I am running Magento using a file cache (lesti FPC)
but also just tried on a static HTML file.

any thoughts on where to look next?
 

lsfoo

Administrator
#2
Hi Rudi,

It looks like there may be a bug with enabling cache, so I will keep you updated on this issue.

Just so you are aware, our cache module does not work with static HTML files by default, so if you wanted to test if the cache module works, try the helloworld in the cgi-bin.

Kevin
 

lsfoo

Administrator
#3
Hi Rudi,

It appears we forgot to update a part of the code, the fix will be in the next OLS update.

For now, if you change the following parameters, the cache should hit for dynamic content:
Code:
ignoreReqCacheCtrl 1
ignoreRespCacheCtrl 1
Let me know how it goes,
Kevin
 

lsfoo

Administrator
#5
Hi Rudi,

How did you test the change?

I downloaded a fresh version of OLS and tested with those parameters and got a cache hit.

My parameters:
enableCache 1
qsCache 1
reqCookieCache 1
respCookieCache 1
ignoreReqCacheCtrl 1
ignoreRespCacheCtrl 1
expireInSeconds 2000
maxStaleAge 1000
enablePrivateCache 1
privateExpireInSeconds 1000
storagePath cachedata

Tested with:
curl -i http://192.168.0.160:8088/cgi-bin/helloworld

The first call will not hit the cache obviously, the second call had the following header:
HTTP/1.1 200 OK
content-type: text/plain
expires: Thu, 14 May 2015 13:03:43 UTC
server: LiteSpeed
x-litespeed-cache: hit,private
content-length: 13
date: Thu, 14 May 2015 13:03:45 GMT

Could you try curling to helloworld to see if you get the cache hit? If it didn't hit, please turn on debug logging, level 10 and access the helloworld page a couple times again and send me the log.
If you'd rather not make it public, you could always email me. (kfwu at litespeedtech dot com)

Kevin
 

lsfoo

Administrator
#8
Hi Rudi,

Glad to hear that it works now!
OpCache and the Cache Module work on different layers, so they shouldn't interfere with each other.

Kevin
 
#9
Does the Cache module of OLS can exclude visitor with specific cookie?
Like with XenForo, Guest and Members can be identified based on cookie.
 

lsfoo

Administrator
#10
Hi RoldanLT,

If you are looking for caching for a Xenforo forum specifically, we do have an addon specifically for it. It should work with OLS, if it doesn't, then there is a bug and it will be fixed.

Otherwise, you can try your hand at rewrite rules. By enabling and using rewrite rules, you can configure the cache to work with cookies. Link

Hope this helps,
Kevin
 

lsfoo

Administrator
#12
Oh my! Thanks for the link, I personally was not aware of this issue, it is being looked at now. I'll keep you up to date.

Kevin
 
Top