Skip to content

Commit df4ecb9

Browse files
committed
change default redis configuration structure
1 parent 7b675ab commit df4ecb9

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

config/database.php

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -115,18 +115,28 @@
115115

116116
'client' => 'predis',
117117

118-
'default' => [
119-
'host' => env('REDIS_HOST', '127.0.0.1'),
120-
'password' => env('REDIS_PASSWORD', null),
121-
'port' => env('REDIS_PORT', 6379),
122-
'database' => env('REDIS_DB', 0),
118+
'options' => [
119+
'cluster' => env('REDIS_CLUSTER', 'predis'),
123120
],
124121

125-
'cache' => [
126-
'host' => env('REDIS_HOST', '127.0.0.1'),
127-
'password' => env('REDIS_PASSWORD', null),
128-
'port' => env('REDIS_PORT', 6379),
129-
'database' => env('REDIS_CACHE_DB', 1),
122+
'clusters' => [
123+
'default' => [
124+
[
125+
'host' => env('REDIS_HOST', '127.0.0.1'),
126+
'password' => env('REDIS_PASSWORD', null),
127+
'port' => env('REDIS_PORT', 6379),
128+
'database' => env('REDIS_DB', 0),
129+
],
130+
],
131+
132+
'cache' => [
133+
[
134+
'host' => env('REDIS_HOST', '127.0.0.1'),
135+
'password' => env('REDIS_PASSWORD', null),
136+
'port' => env('REDIS_PORT', 6379),
137+
'database' => env('REDIS_CACHE_DB', 1),
138+
],
139+
],
130140
],
131141

132142
],

0 commit comments

Comments
 (0)