Litespeed cache for phpbb3/phpbb2 RELEASED

#1
No teasers ;), I am actually releasing the lscache solution for phpbb3 and I am sure it works for phpbb2 as well since there is not much difference in how they operate.

All you need is to enter few htaccess rules and the name of your phpbb3/2 cookie name. Here is the code

Please note in the code where it says "PHPBB3COOKIENAME" replace it with your phpbb cookie name. DO NOT touch the _u part of it.

# LiteSpeed phpbb cache by NTS
<IfModule litespeed>
CacheLookup public on
RewriteEngine On
# cache
RewriteCond %{HTTP_COOKIE} !(PHPBB3COOKIENAME_u);? [NC,OR]
RewriteCond %{HTTP_COOKIE} (PHPBB3COOKIENAME_u=1);? [NC]
RewriteCond %{REQUEST_URI} viewtopic.php|memberlist.php|viewonline.php [NC]
RewriteRule .* - [E=Cache-Control:max-age=360,E=Cache-Control:vary=loggedin]
# no cache
RewriteCond %{HTTP_COOKIE} (PHPBB3COOKIENAME_u>1);? [NC]
RewriteRule .* - [E=Cache-Control:no-cache]
</IfModule>

That's it! It will cache topics/memberlist/whosonline. You can add more pages as you wish, I didn't want to cache the index page or viewforum so I can see fresh content there. max-age=360 is where you control how long the cache will be kept.

It took me half a day to get this right so I hope you guys appreciate me sharing this for free. Can't believe I am the only person in the whole wide world to do this for the first time :D

Enjoy

EDIT: I have perfected the solution. PM me if you want it
 
Last edited:

serpent_driver

Well-Known Member
#2
Can't believe I am the only person in the whole wide world to do this for the first time :D
You are not the only one, sorry. From a (very) far distance your solution seems to look fine, but it's only a quick and dirty solution. You overlook a lot to make your solution more practical, but nevertheless, congratulation. Improve it and you are welcome to publish upcoming releases of your solution.
 
#4
you will never walk alone ;)
I wouldn’t use it actually. After extensive testing, I don’t remember what but there were few issues.

The perfect solution which I use on my live site requires editing both phpbb files and modifications to the htaccess code I posted above. I paid for serpent_driver code but even his had some issues for me, for the most part it worked well.

It’s the reason why I am selling it now because the amount of time and effort it took me and the benefits it gives can literally save you thousands of dollars and hosting expenses add up really fast. Why not spend that on my perfect cache solution.

Even still the htaccess code I posted above should be a good guide. I had to start from scratch unfortunately
 

serpent_driver

Well-Known Member
#5
@NTS

You have to get the situation right. Otherwise, interested users will get the wrong impression. Basically, with LScache it is possible to provide the almost perfect cache solution for every requirement, no matter how complex. However, the possibilities based only on modRewrite are limited. A near perfect caching solution for phpbb can only be made possible with PHP and even then there are limitations because phpbb is not very cache friendly.
 
Top