Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 67b93f6

Browse files
committed
[cache] Bump RedisAdapter timeout to 5s
Bump RedisAdapter timeout to 5s because (at least with Predis) 0 means 0s
1 parent 6ba0414 commit 67b93f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/Cache/Adapter/RedisAdapter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class RedisAdapter extends AbstractAdapter
2525
private static $defaultConnectionOptions = array(
2626
'class' => null,
2727
'persistent' => 0,
28-
'timeout' => 0,
28+
'timeout' => 5,
2929
'read_timeout' => 0,
3030
'retry_interval' => 0,
3131
);
@@ -60,7 +60,7 @@ public function __construct($redisClient, $namespace = '', $defaultLifetime = 0)
6060
* @param string $dsn
6161
* @param array $options See self::$defaultConnectionOptions
6262
*
63-
* @throws InvalidArgumentException When the DSN is invalid.
63+
* @throws InvalidArgumentException When the DSN is invalid
6464
*
6565
* @return \Redis|\Predis\Client According to the "class" option
6666
*/

0 commit comments

Comments
 (0)