Download the PHP package fof/redis without Composer
On this page you can find all versions of the php package fof/redis. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package redis
Redis sessions, cache & queues
This library allows using Redis as cache, session and for the queue. You can only
enable these services by using a local extender (the extend.php
in
the root of your Flarum installation). See the "Set up" section below.
This is an advanced utility for webmasters!
Installation
Install manually with composer:
Set up
In your extend.php
:
This enables sessions, cache and queue to run on redis.
See "Use different database for each service" below to split up the database for cache vs sessions, queue because a cache clear action will clear sessions and queue jobs as well if they share the same database.
Advanced configuration
-
Disable specific services:
-
Use different database for each service:
-
Completely separate the config array:
- Use a cluster:
Queue
Make sure to start your queue workers, see
the laravel documentation for specifics.
To test the worker can start use php flarum queue:work
.
Queue options
The queue allows for several options to be added, retry_after, block_for and after_commit. You can set these
by adding a queue
array in the configuration:
You can read up on the meaning of these options in the Laravel Documentation.
Migrating from blomstra/flarum-redis
Simply update the namespace used in your extend.php
file from Blomstra\Redis...
to FoF\Redis...
Updating
FAQ
Why are there still files in storage/cache? Some code still relies on physical files being present. This includes the formatter cache and the view caches.
Links
All versions of redis with dependencies
illuminate/redis Version ^11.42
predis/predis Version ^v2.3.0