| 123456789101112131415161718192021 |
- <?php
- $connection = [
- 'password' => env('REDIS_PASSWORD', ''),
- 'host' => env('REDIS_HOST', '127.0.0.1'),
- 'port' => env('REDIS_PORT', 6379),
- 'database' => env('REDIS_DB', 0),
- 'pool' => [
- 'max_connections' => 5,
- 'min_connections' => 1,
- 'wait_timeout' => 3,
- 'idle_timeout' => 60,
- 'heartbeat_interval' => 50,
- ],
- ];
- return [
- 'default' => $connection,
- // A separate short-timeout pool keeps protection failures bounded.
- 'mini_protection' => array_replace($connection, ['timeout' => 1, 'read_timeout' => 1]),
- ];
|