Laravel package to provide swoole redis pool integration, Laravel redis pool cache and session driver.
shashandr/laravel-swoole-redis is a Laravel package for laravel package to provide swoole redis pool integration, laravel redis pool cache and session driver..
It currently has 1 GitHub stars and 23 downloads on Packagist (latest version 1.0.0).
Install it with composer require shashandr/laravel-swoole-redis.
Discover more Laravel packages by shashandr
or browse all Laravel packages to compare alternatives.
Last updated
Default Laravel redis connection may cause errors when running in Swoole coroutines.
This package adds support of Swoole RedisPool as a cache and session driver for Laravel.
This is a fork of antyblin/laravel-swoole-redis package, original idea belongs to https://github.com/antyblin.
Install package
composer require shashandr/laravel-swoole-redis
Add redis_pool store to the stores section in config/cache.php:
'redis_pool' => [
'driver' => 'redis',
'connection' => 'default',
],
Change your redis driver or session driver to redis_pool in your .env file and that is it.
You may add additional parameter 'pool_size' to the redis section in config/database.php.
This parameter sets maximum quantity of connections in RedisPool.
'default' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST'),
'password' => env('REDIS_PASSWORD'),
'port' => env('REDIS_PORT'),
'database' => env('REDIS_CACHE_DB'),
'pool_size' => env('REDIS_POOL_SIZE', 64)
],