Adds Redis cache and queue to Flarum

Installs: 1 579

Dependents: 1

Suggesters: 0

Security: 0

Stars: 1

Watchers: 4

Forks: 0


0.1.0 2019-11-04 14:38 UTC

This package is auto-updated.

Last update: 2020-05-16 14:52:39 UTC


This extension allows switching the Flarum native file cache and sync queue with a redis based cache and queue.


Use Bazaar or install using composer:

$ composer require bokt/flarum-redis

After that enable the extension in your admin area.


In your local extend.php you need to decide what you want to use:

return [
    new Bokt\Redis\Extend\EnableRedisCache($config = [
        'url' => env('REDIS_URL'),
        'host' => env('REDIS_HOST', ''),
        'password' => env('REDIS_PASSWORD', null),
        'port' => env('REDIS_PORT', 6379),
        'database' => env('REDIS_CACHE_DB', 1),
    new Bokt\Redis\Extend\EnableRedisQueue($config),

You can use different configs for cache and queue. But you can also point at a file:

return [
    new Bokt\Redis\Extend\EnableRedisCache('cache.php'),
    new Bokt\Redis\Extend\EnableRedisQueue('queue.php'),

Make sure the file returns an array containing the configuration.