Litespeed web server v4.0.20 – Litespeed Cache function improvements
Seems Litespeed web server v4.0.20 has been released with support for CloudLinux SecureLVE but more importantly includes additional improvements for Litespeed Cache. A new response header called X-LiteSpeed-Cache-Control has been added to Litespeed which allows more accurate detection of what pages to cache or not. For instance with v4.0.20, when implementing Litespeed Cache with vBulletin forums you will need to make a slight change to the vB Boost plugin file product-boostv1.xml. Explanation posted by George (mistwang) on their support forums here. You will also need to enable the plugin for ‘Send X-Accel-Expires header for logged in users‘ by changing plugin active from 0 to 1.
in product-boostv1.xml file change the following line from:
<plugin active="0" executionorder="1"> <title>Send X-Accel-Expires header for logged in users</title> <hookname>style_fetch</hookname> <phpcode><![CDATA[// Do not cache logged in user pages if ( $vbulletin->userinfo['userid'] ) { header('X-Accel-Expires: 0'); };]]></phpcode> </plugin> |
to
<plugin active="1" executionorder="1"> <title>Send X-Accel-Expires header for logged in users</title> <hookname>style_fetch</hookname> <phpcode><![CDATA[// Do not cache logged in user pages if ( $vbulletin->userinfo['userid'] ) { header('X-LiteSpeed-Cache-Control: no-cache' ); };]]></phpcode> </plugin> |
Then reinstall/overwrite the vB Boost plugin product-boostv1.xml file on your vBulletin forums. You must have Litespeed web server upgraded to v4.0.20 to make use of this new response header. Screenshot comparison, original (left) vs new changes (right).
Litespeed v4.0.20 change log
- Added support for Cloud Linux SecureLVE.
- Added a new response header “x-litespeed-cache-control” to allow program to control LiteSpeed page cache behavior.
Common cache control values are supported like no-cache, no-store, public, private, max-ages. Changed the status code of “Request Timeout” from 408 to 500; this is to avoid client retrying automatically. - Retrying requests are limited to 30 seconds to avoid being processed for too long.
- Updated openssl to 0.9.8r.
- Fixed missing download url of mail header, suhosin patch for latest php version in web admin console – phpbuild.