[Resolved] Can't get LSCache working for guests on my vBulletin forum without affecting members

Status
Not open for further replies.

asabet

Active Member
#21
I don't even want to chance something weird happening with the style changes, so I took the changes you made and altered them slightly as follows:
Code:
## separate cache for mobile users
RewriteCond %{HTTP_USER_AGENT} "iPhone|iPod|Android|Mobile|Phone"
RewriteRule ^(.*\.php)?$ $1?mobile_view=1 [QSA]

## select which pages to cache
RewriteCond %{HTTP_USER_AGENT} "iPhone|iPod|Android|Mobile|Phone|Windows|Mac|spider|crawl|slurp|bot"
RewriteCond %{HTTP_COOKIE} !bb_skipmobilestyle=
RewriteCond %{HTTP_COOKIE} !bb_userstyleid=
RewriteCond %{HTTP_COOKIE} !bb_imloggedin=yes
RewriteCond %{HTTP_COOKIE} !bb_userid=
RewriteCond %{HTTP_COOKIE} !bb_password=
RewriteCond %{REQUEST_METHOD} ^HEAD|GET$
RewriteCond %{QUERY_STRING} !s=[a-fA-F0-9]{32}
RewriteCond %{QUERY_STRING} !product=vbnexus
RewriteCond %{REQUEST_URI} !^/(login|register|usercp|private|profile|cron|image)\.php$
RewriteCond %{REQUEST_URI} !^/admincp
RewriteRule ^(.*\.php)?$ - [E=Cache-Control:max-age=600]
Seems to be working extremely well!
 
Last edited by a moderator:

NiteWave

Administrator
#22
great to work well!

this line
Code:
RewriteCond %{HTTP_USER_AGENT} "iPhone|iPod|Android|Mobile|Phone|Windows|Mac|spider|crawl|slurp|bot"
looks safe to be deleted since it covers almost all user agents.
 
Last edited by a moderator:

asabet

Active Member
#23
There are a few oddball user agents, eg Blackberry or Palm, which could fall outside of those and possibly lead to a mobile page getting cached and served to as desktop user. It's working well enough as is that I don't want to mess with it. Thanks again for all your great help.
 

track1

Well-Known Member
#24
There are a few oddball user agents, eg Blackberry or Palm, which could fall outside of those and possibly lead to a mobile page getting cached and served to as desktop user. It's working well enough as is that I don't want to mess with it. Thanks again for all your great help.
Im testing this too, trying to get it working for guests users as cache, logged users as private cache, and working with mobile style detector.

what % of Cache Hit Rate are you getting?
you can see this under real time stats at litespeed admin panel
 

asabet

Active Member
#25
Im testing this too, trying to get it working for guests users as cache, logged users as private cache, and working with mobile style detector.

what % of Cache Hit Rate are you getting?
you can see this under real time stats at litespeed admin panel
I just switched all my sites over to Xenforo, so I'm not using this anymore. I can tell you that when I had it going, my cache rate was very high for the pages that were seeing high traffic.
 
Status
Not open for further replies.
Top