trait RedisTrait
init($redisClient, $namespace = '', $defaultLifetime) | ||
static Redis|Client | createConnection(string $dsn, array $options = array()) Creates a Redis connection using a DSN configuration. |
$redisClient | ||
$namespace | ||
$defaultLifetime |
Creates a Redis connection using a DSN configuration.
Example DSN: - redis://localhost - redis://example.com:1234 - redis://[email protected]/13 - redis:///var/run/redis.sock - redis://secret@/var/run/redis.sock/13
string | $dsn | |
array | $options | See self::$defaultConnectionOptions |
Redis|Client | According to the "class" option |
InvalidArgumentException | when the DSN is invalid |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/4.0/Symfony/Component/Cache/Traits/RedisTrait.html