bokt/flarum-redis
Adds Redis support to Flarum, letting you move caching, sessions, and queued jobs into Redis for faster, more scalable forums. Configure it easily from the admin panel—ideal for high-traffic communities running multiple app servers that need shared cache and session storage.
composer require bokt/flarum-redis, then enable it in the admin if it is exposed as an extension; otherwise it just registers service providers).redis-cli -h 127.0.0.1 -p 6379 ping # -> PONG
config.php (Flarum reads this file per request; there is no Laravel-style config cache to clear):
'redis' => [
'host' => '127.0.0.1',
'port' => 6379,
'database' => 0,
'password' => null,
],
'cache' => [
'driver' => 'redis',
],
'queue' => [
'driver' => 'redis',
'connection' => 'default',
],
php flarum cache:clear) and check Redis for Flarum keys (redis-cli --scan --pattern 'flarum*'). If keys appear, the cache side is live.php flarum queue:work
Put that under Supervisor/systemd in any real deployment.Look first at config.php, then at the extension's service providers (extend.php / src/) to see exactly which cache store and queue connection names it binds. That tells you what strings are valid for cache.driver and queue.connection in your version.
resolve(Flarum\Cache\Cache::class) or the Cache facade) so it keeps working on file or Redis interchangeably.resolve('Illuminate\Contracts\Bus\Dispatcher')->dispatch(new ReindexDiscussion($id));
Keep jobs serializable and idempotent — workers retry.FLUSHDB or a cache:clear never nukes queued jobs.php flarum queue:work --tries=3 --timeout=90 under a process manager, scale workers horizontally for bursts (e.g., mass email), and php flarum queue:restart as a deploy hook so workers reload code.cache on file and only move queue — partial adoption is a valid rollout.composer.json and test upgrades of Flarum separately. If cache.driver/queue.connection keys don't match what the provider expects, you silently fall back to defaults rather than erroring.config.php, not .env. Flarum doesn't read Laravel .env for these. Putting Redis settings in the wrong place is the most common "it didn't switch" cause.php flarum queue:restart. Long-running workers keep the old code in memory and will fail on changed job constructors.UploadedFile) will fail at dispatch or on the worker. Pass IDs and reload inside the job.cache:clear scope. Confirm what the extension's clear actually flushes. If Flarum and other apps share a Redis DB, prefer dedicated DB indexes or a key prefix rather than broad flushes.password with a blank username is a frequent connection failure; check redis-cli -a <pw> ping with the exact credentials.redis-cli monitor to see live commands during a request, redis-cli --scan --pattern 'flarum*' to inspect keys, and the worker's foreground output (queue:work without a daemon) to surface job exceptions.queue.connection / cache at that name rather than editing the vendor package.How can I help you explore Laravel packages today?