LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > LSWS 4.1 Release > cache function ?

Reply
 
Thread Tools Display Modes
  #11  
Old 05-07-2009, 10:33 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Max Obj Size of 1024 is too small I think. If a page larger than 1K, LSWS will not cache it. Cache Expire time should be shorter, start from 1-5 minutes, just in case that some page should not be cached was cached.

If you use cPanel, you should rebuild Apache with mod_cache support, then go to "service configuration >> Apache Configuration ", Edit Apache include files, edit "Pre Main Include", add

CacheRoot ...
CacheEnable disk /


It will enable cache for all vhosts configured through httpd.conf .

The reason to build Apache with mod_cache and mod_disk_cache is that, Apache will fail configuration test if not.

Yes, using faster disk will help with the performance.

Be conservative with cache configuration, only let web server to cache the page when the page can be cached. be extremely careful with the option that "Ignore Cache control headers".
Reply With Quote
  #12  
Old 05-14-2009, 03:03 PM
muiruri muiruri is offline
Member
 
Join Date: Jun 2008
Posts: 32
I've now rebuild Apache with mod_cache & mod_disk_cache

Then gone to cpanel / WHM, to "service configuration >> Apache Configuration ", Edit Apache include files, edit "Pre Main Include"

Then added two lines;

CacheRoot /backup/cache/
CacheEnable disk /

1st line is where the cache folder is.

In LSWS on the Configuration -> Cache

I have Max Object Size = 1024000

Enable Cache = Yes
Cache Expire Time (seconds) = 120

The rest of the settings;

Cache Request with Query String
Cache Request with Cookie
Cache Response with Cookie
Ignore Request Cache-Control
Ignore Response Cache-Control

I have left them as "Not Set"

The cache folder appears to be growing with some files.

What do you think of this now?

How do I check or monitor to see if this is working effectively or efficiently?

Any additional ideas/suggestions?
Reply With Quote
  #13  
Old 05-24-2009, 12:16 PM
ShawnMarck ShawnMarck is offline
New Member
 
Join Date: May 2009
Posts: 1
I'm only using our LSWS Server for reverse proxies and I am not seeing the cache working either.

I've enabled caching on the server level, vhost level, context level.

I set the cache store location.
Set the max size to 1024000
Set the expiration to 3600

I'm still seeing each connection go through to the ext app.

What am I missing?
Reply With Quote
  #14  
Old 05-24-2009, 02:02 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
The default cache policy is conservative, do not cache request/response with cookies, do not cache request/response when cache-control does not allow caching.

So, try a simple page like phpinfo() page first, on client side, check the request/response header with firebug to make sure there is no header that could prevent LSWS from caching the response.

Once phpinfo() page works, then you can start to check the other pages, and fine tune the cache policy carefully. It is not recommended to ignore the cache control header unless you know what you are doing and the page is safe to be cached.
Reply With Quote
  #15  
Old 05-25-2009, 08:50 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
If you think LSWS does not cache certain page, you need to check the request/response header see if anything prevent the page being cached.

Request with Query String? Request Cookie? Response Cookie? Request cache-control? response cache-control?

If you think a page can be safely cached even with some header can prevent it from being cached, you can adjust the cache policy to force LSWS to cache that page, you may need to create a context for that URL.
Reply With Quote
  #16  
Old 05-25-2009, 09:49 PM
muiruri muiruri is offline
Member
 
Join Date: Jun 2008
Posts: 32
(a) This is what we're using in LSWS;

Cache Storage Settings
---------------------
Storage Path = /backup/cache (using server's backup HD)
Max Object Size = 1024000

Cache Policy
-----------
Enable Cache = Yes
Cache Expire Time (seconds) = 120
Cache Request with Query String = No
Cache Request with Cookie = No
Cache Response with Cookie = No
Ignore Request Cache-Control = No
Ignore Response Cache-Control = No


(b) Then at WHM, Rebuild Apache with mod_cache & mod_disk_cache

(c) When done, again at WHM, went to;

Service configuration -> Apache Configuration

Edit Apache include files -> Pre Main Include

Selected Apache 2.x

Then added two lines;

CacheRoot /backup/cache/
CacheEnable disk /

The cache directory has been growing, therefore believe cache is working well.

Question now is there one of the menu sections in LSWS where I can see or monitor files or data cached Or better still is there a place in LSWS I can see the LSWS using the cache?
Reply With Quote
  #17  
Old 05-26-2009, 06:58 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
No, not possible to monitor the cache status at this moment. May add it to the real time report in the future release.
Reply With Quote
  #18  
Old 10-06-2009, 03:57 PM
canglan canglan is offline
Member
 
Join Date: Oct 2006
Posts: 17
Hi,

Does the VPS license have the cache feature enabled? We have a couple of VPS licenses installed and we cannot get any of them working.

LSWS cache settings are set. Apache directives are set. The cache directory is still empty.

How do we go about identifying the cause?
Reply With Quote
  #19  
Old 10-06-2009, 04:31 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Cache function is only available for 2-CPU license and above. It is not available for VPS license.
Reply With Quote
  #20  
Old 10-06-2009, 05:42 PM
canglan canglan is offline
Member
 
Join Date: Oct 2006
Posts: 17
Thank you George. All sorted, caching is working beautifully.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 06:02 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.