redis.php 583 B

123456789101112131415161718192021
  1. <?php
  2. $connection = [
  3. 'password' => env('REDIS_PASSWORD', ''),
  4. 'host' => env('REDIS_HOST', '127.0.0.1'),
  5. 'port' => env('REDIS_PORT', 6379),
  6. 'database' => env('REDIS_DB', 0),
  7. 'pool' => [
  8. 'max_connections' => 5,
  9. 'min_connections' => 1,
  10. 'wait_timeout' => 3,
  11. 'idle_timeout' => 60,
  12. 'heartbeat_interval' => 50,
  13. ],
  14. ];
  15. return [
  16. 'default' => $connection,
  17. // A separate short-timeout pool keeps protection failures bounded.
  18. 'mini_protection' => array_replace($connection, ['timeout' => 1, 'read_timeout' => 1]),
  19. ];