|
|

12-27-2012, 07:10 AM
|
|
Member
|
|
Join Date: Dec 2012
Posts: 16
|
|
LiteSpeed Cache + PhpFox
Hello,
Successful enable LiteSpeed Cache, but i'm having one problem with the phpfox website.
After i'm added RewriteRule cache .htacesss
RewriteRule (.*\.php)?$ - [L,E=Cache-Control:max-age=120]
The server seems very fast and cache is working, but one problem is the session user changed to another user. Which mean i'm as administrator/admin change to another user. (Session ID changing)
I'm don't know, why this happen?
I'm disable cache by commented out # on .htaccess.
It's back to normal,but no cache apply from LiteSpeed.
Hope LiteSpeed Staff can look at my issue.
Here my cache setting on LiteSpeed
Storage Path /dev/shm/lsdiskcache
Max Object Size Not Set
Enable Cache No
Cache Expire Time (seconds) Not Set
Cache Request with Query String Yes
Cache Request with Cookie Yes
Cache Response with Cookie Yes
Ignore Request Cache-Control Yes
Ignore Response Cache-Control Yes
Enable Private Cache No
Private Cache Expire Time (seconds) 120
Note : I'm applying LiteSpeed with PHPFox.
Thanks.
Last edited by LowKey; 12-27-2012 at 08:22 AM..
|

12-27-2012, 10:51 AM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,585
|
|
|
You can only use private cache for login user, public cache for guest visitors.
Please read more about our wikis.
|

12-27-2012, 01:29 PM
|
|
New Member
|
|
Join Date: Dec 2012
Posts: 9
|
|
Quote:
Originally Posted by LowKey
Hello,
Successful enable LiteSpeed Cache, but i'm having one problem with the phpfox website.
After i'm added RewriteRule cache .htacesss
RewriteRule (.*\.php)?$ - [L,E=Cache-Control:max-age=120]
The server seems very fast and cache is working, but one problem is the session user changed to another user. Which mean i'm as administrator/admin change to another user. (Session ID changing)
I'm don't know, why this happen?
I'm disable cache by commented out # on .htaccess.
It's back to normal,but no cache apply from LiteSpeed.
Hope LiteSpeed Staff can look at my issue.
Here my cache setting on LiteSpeed
Storage Path /dev/shm/lsdiskcache
Max Object Size Not Set
Enable Cache No
Cache Expire Time (seconds) Not Set
Cache Request with Query String Yes
Cache Request with Cookie Yes
Cache Response with Cookie Yes
Ignore Request Cache-Control Yes
Ignore Response Cache-Control Yes
Enable Private Cache No
Private Cache Expire Time (seconds) 120
Note : I'm applying LiteSpeed with PHPFox.
Thanks.
|
in some of softwares that based on cookies this options may cause some weired problems .
so set it to no and take a shot !
Quote:
Cache Request with Cookie Yes
Cache Response with Cookie Yes
|
|

12-27-2012, 03:30 PM
|
|
Member
|
|
Join Date: Dec 2012
Posts: 16
|
|
Quote:
Originally Posted by imohsen
in some of softwares that based on cookies this options may cause some weired problems .
so set it to no and take a shot !
|
I'm follow the setting,
but getting error :
404 Not Found
The resource requested could not be found on this server!
Can't open the website. Please help 
Thanks.
|

12-27-2012, 06:03 PM
|
|
Member
|
|
Join Date: Dec 2012
Posts: 16
|
|
|
Hello,
Seems i'm successful apply cache,
I'm put this on .htaccess
RewriteEngine On
## cache should be available for HEAD or GET requests
RewriteCond %{REQUEST_METHOD} ^HEAD|GET$
## select which pages to cache
RewriteCond %{HTTP_COOKIE} page_contain_cachetoken=yes
# with other condition
RewriteCond %{QUERY_STRING} !s=[a-fA-F0-9]{32}
# excluding certain URLs
RewriteCond %{REQUEST_URI} !/(login|register|usercp|private|profile|cron|image) \.php$
# cache for 2 mins for php pages only
RewriteRule /(.*\.php)?$ – [L,E=Cache-Control:max-age=120]
and the website running, without any error dumped on error_log.
However this is public cache right ? I have question how to check whether this is already cached by LiteSpeed Cache or I'm also using CloudFlare .
I'm need guide how to make private cache also.
#Update1
VH Name Req in Processing Req/Sec Total Req Total Cache Hits Cache Hits/Sec Output Bandwidth ExtApp Processes EAProc In Use EAProc Idle EAProc WaitQ EAProc Req/Sec
APVH_xxx.net 110 118.4 31,136 0 0.0 0 2 10 0 100 109
Total Cache Hits : 0 <-- still not working.
Thanks.
Last edited by LowKey; 12-27-2012 at 06:23 PM..
|

12-27-2012, 06:58 PM
|
|
LiteSpeed Staff
|
|
Join Date: Sep 2009
Posts: 2,218
|
|
Quote:
|
I have question how to check whether this is already cached by LiteSpeed Cache
|
please refer:
http://blog.litespeedtech.com/2011/0...uilt-in-cache/
Quote:
7. Verify if pages are served from the cache
Since 4.0.19, LiteSpeed will output a response header 'X-LiteSpeed-Cache hit' if the content is served from its internal cache.
|
can check the header in firebug.
Quote:
|
Total Cache Hits : 0 <-- still not working.
|
you're right. this number tell you the cache hits number.
Last edited by NiteWave; 12-27-2012 at 09:05 PM..
|

12-27-2012, 07:04 PM
|
|
Member
|
|
Join Date: Dec 2012
Posts: 16
|
|
|
Hello,
Unfortunately, i can't see any response header response header “X-LiteSpeed-Cache hit”
I'm using FireBug to check the header.
|

12-28-2012, 06:19 PM
|
|
LiteSpeed Staff
|
|
Join Date: Oct 2010
Posts: 2,337
|
|
|
[QUOTE=LowKey;41549]...
# cache for 2 mins for php pages only
RewriteRule /(.*\.php)?$
|

12-28-2012, 06:20 PM
|
|
LiteSpeed Staff
|
|
Join Date: Oct 2010
Posts: 2,337
|
|
Quote:
Originally Posted by LowKey
...
# cache for 2 mins for php pages only
RewriteRule /(.*\.php)?$ – [L,E=Cache-Control:max-age=120]
...
|
Try:
RewriteRule (.*\.php)?$ – [L,E=Cache-Control:max-age=120]
# leading "/" should be removed in .htaccess
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 08:23 AM.
|
|