diff --git a/config/cache.php b/config/cache.php index 3ffa840b..232416c4 100644 --- a/config/cache.php +++ b/config/cache.php @@ -60,7 +60,7 @@ return [ 'redis' => [ 'driver' => 'redis', - 'connection' => 'default', + 'connection' => env('CACHE_REDIS_CONN', 'cache'), ], ], diff --git a/config/database.php b/config/database.php index 0b11aceb..7b5f2613 100644 --- a/config/database.php +++ b/config/database.php @@ -105,14 +105,33 @@ return [ */ 'redis' => [ - + /* + * @see https://github.com/predis/predis/wiki/Connection-Parameters + */ 'cluster' => false, 'default' => [ 'host' => env('REDIS_HOST'), 'port' => env('REDIS_PORT'), - 'database' => env('REDIS_DB', 0), + 'database' => 0, 'password' => env('REDIS_PASSWORD'), + 'timeout' => env('REDIS_TIMEOUT', 30.0) + ], + + 'cache' => [ + 'host' => env('REDIS_HOST'), + 'port' => env('REDIS_PORT'), + 'database' => 0, + 'password' => env('REDIS_PASSWORD'), + 'timeout' => env('REDIS_TIMEOUT', 30.0) + ], + + 'session' => [ + 'host' => env('REDIS_HOST'), + 'port' => env('REDIS_PORT'), + 'database' => 1, + 'password' => env('REDIS_PASSWORD'), + 'timeout' => env('REDIS_TIMEOUT', 30.0) ], ], diff --git a/config/session.php b/config/session.php index 0abc9aac..39306e12 100644 --- a/config/session.php +++ b/config/session.php @@ -70,7 +70,7 @@ return [ | */ - 'connection' => null, + 'connection' => env('SESSION_CONNECTION', 'session'), /* |--------------------------------------------------------------------------