acpl / flarum-lscache
Speed up your forum on LiteSpeed Web Server.
Fund package maintenance!
android-com-pl
Installs: 519
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 2
Forks: 0
Open Issues: 1
Type:flarum-extension
Requires
- php: ^7.4||^8.0
- flarum/core: ^1.2
- guzzlehttp/guzzle: ^7.4
README
A Flarum extension. Integrates LSCache with your forum.
Requires a LiteSpeed Web Server or OpenLiteSpeed.
Installation
Install with composer:
composer require acpl/flarum-lscache:"*"
You need to include this code in your .htaccess
file:
<IfModule LiteSpeed> CacheLookup on </IfModule>
You can also add your own rules. For more information see here: https://docs.litespeedtech.com/lscache/noplugin/settings/#rewrite-rules
Updating
composer update acpl/flarum-lscache:"*"
php flarum migrate
php flarum cache:clear
When you clear the Flarum cache, the LSCache is cleared automatically. Unless you disable it in the settings.
You can clear LSCache without clearing the Flarum cache in the admin panel. The option is available under the standard Flarum cache clearing option. There is also the php flarum lscache:clear
command. The command supports the --path
argument. E.g. php flarum lscache:clear --path=/tags --path=/d/1-test
. You can use it if you want to purge only specific paths instead of the entire cache.
FAQ
How do I avoid generating different cache versions for specific query strings? E.g. fbclid.
You can use CacheKeyModify -qs:[key]
.
Example:
<IfModule LiteSpeed> CacheLookup on CacheKeyModify -qs:fbclid CacheKeyModify -qs:gclid CacheKeyModify -qs:utm* CacheKeyModify -qs:_ga </IfModule>