1'redis' => [
2
3 'client' => 'predis',
4
5 // Keep Default as is you want to use both redis and sentinel for different service(cache, queue)'
6 'default' => [
7 'host' => env('REDIS_HOST', '127.0.0.1'),
8 'password' => env('REDIS_PASSWORD', null),
9 'port' => env('REDIS_PORT', 6379),
10 'database' => 0,
11 ],
12
13 // Create a custom connection to use redis sentinel
14 'cache_sentinel' => [
15 // Set the Sentinel Host from Environment (optinal you can hardcode if want to use in prod only)
16 env('CACHE_REDIS_SENTINEL_1'),
17 env('CACHE_REDIS_SENTINEL_2'),
18 env('CACHE_REDIS_SENTINEL_3'),
19 'options' => [
20 'replication' => 'sentinel',
21 'service' => 'cachemaster'),
22 'parameters' => [
23 'password' => env('REDIS_PASSWORD', null),
24 'database' => 0,
25 ],
26 ],
27 ],
28 ],
29