redis.php 774 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * This file is part of Hyperf.
  5. *
  6. * @link https://www.hyperf.io
  7. * @document https://hyperf.wiki
  8. * @contact group@hyperf.io
  9. * @license https://github.com/hyperf/hyperf/blob/master/LICENSE
  10. */
  11. use function Hyperf\Support\env;
  12. return [
  13. 'default' => [
  14. 'host' => env('REDIS_HOST', 'localhost'),
  15. 'auth' => env('REDIS_AUTH', null),
  16. 'port' => (int) env('REDIS_PORT', 6379),
  17. 'db' => (int) env('REDIS_DB', 0),
  18. 'pool' => [
  19. 'min_connections' => 1,
  20. 'max_connections' => 10,
  21. 'connect_timeout' => 10.0,
  22. 'wait_timeout' => 3.0,
  23. 'heartbeat' => -1,
  24. 'max_idle_time' => (float) env('REDIS_MAX_IDLE_TIME', 60),
  25. ],
  26. ],
  27. ];