Enable Redis caching and queues for FreeScout.
Inspired by #4650.
- Ensure Redis server is installed.
- Ensure phpredis (not predis) module for PHP is installed. (Both PHP-FPM and the PHP cli!)
- Double-check your Redis settings in
config/database.php. It must use phpredis, not predis. - Add to your .env:
CACHE_DRIVER=redis CACHE_PREFIX=freescout QUEUE_DRIVER=redis # Session drivers in FreeScout appear to be broken or incompatible with PHP 8. Only file and database drivers work. # SESSION_DRIVER=redis - Activate the Redis Driver module.
- Run php artisan
freescout:clear-cache.
When using PHP 8.4 you will see deprecation warnings, even when you have those disabled! This will interfere with your mail fetching!
This is a bug specific to PHP 8.4: php/php-src#17422
Please use PHP 8.1-8.3 or 8.5+.
You may start redis-cli and run KEYS freescout:* to check that the redis cache is being used.
- Why phpredis, not predis? Using phpredis requires us to install a driver in PHP only. This removes the maintenance burden that comes with adding predis to FreeScout.