From 46108735b88fefe48df2947ea00f1ab603beac8b Mon Sep 17 00:00:00 2001 From: devansh bawari Date: Fri, 26 Mar 2021 18:27:06 +0530 Subject: [PATCH] Redis Cache And Config Fixed --- .env.example | 1 + config/cache.php | 4 +--- config/database.php | 7 +++++++ config/session.php | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.env.example b/.env.example index 5676f7eb2..81da09125 100644 --- a/.env.example +++ b/.env.example @@ -21,6 +21,7 @@ DB_PREFIX= BROADCAST_DRIVER=log CACHE_DRIVER=file SESSION_DRIVER=file +SESSION_DATABASE_CONNECTION= SESSION_LIFETIME=120 QUEUE_DRIVER=sync diff --git a/config/cache.php b/config/cache.php index d21c358e7..d30909e67 100755 --- a/config/cache.php +++ b/config/cache.php @@ -69,8 +69,7 @@ return [ ], 'redis' => [ - - 'client' => 'predis', + 'driver' => 'redis', 'clusters' => [ 'default' => [ @@ -82,7 +81,6 @@ return [ ], ], ], - ], ], diff --git a/config/database.php b/config/database.php index e84936069..2505602b4 100755 --- a/config/database.php +++ b/config/database.php @@ -115,6 +115,13 @@ return [ 'database' => 0, ], + 'session' => [ + 'host' => env('REDIS_HOST', '127.0.0.1'), + 'password' => env('REDIS_PASSWORD', null), + 'port' => env('REDIS_PORT', 6379), + 'database' => 1, + ], + ], ]; diff --git a/config/session.php b/config/session.php index 23ddfde9d..147e69d9c 100755 --- a/config/session.php +++ b/config/session.php @@ -70,7 +70,7 @@ return [ | */ - 'connection' => null, + 'connection' => env('SESSION_DATABASE_CONNECTION', null), /* |--------------------------------------------------------------------------