Browse Source

Use seperate cache DB for Redis

Barry vd. Heuvel 5 years ago
parent
commit
c3b99e971c
2 changed files with 9 additions and 2 deletions
  1. 1 1
      config/cache.php
  2. 8 1
      config/database.php

+ 1 - 1
config/cache.php

@@ -70,7 +70,7 @@ return [
 
         'redis' => [
             'driver' => 'redis',
-            'connection' => 'default',
+            'connection' => 'cache',
         ],
 
     ],

+ 8 - 1
config/database.php

@@ -112,7 +112,14 @@ return [
             'host' => env('REDIS_HOST', '127.0.0.1'),
             'password' => env('REDIS_PASSWORD', null),
             'port' => env('REDIS_PORT', 6379),
-            'database' => 0,
+            'database' => env('REDIS_DB', 0),
+        ],
+
+        'cache' => [
+            'host' => env('REDIS_HOST', '127.0.0.1'),
+            'password' => env('REDIS_PASSWORD', null),
+            'port' => env('REDIS_PORT', 6379),
+            'database' => env('REDIS_CACHE_DB', 1),
         ],
 
     ],