trait RedisTrait

Methods

init($redisClient, $namespace = '', $defaultLifetime)

No description

static Redis|Client
createConnection(string $dsn, array $options = array())

Creates a Redis connection using a DSN configuration.

Details

at line line 43
init($redisClient, $namespace = '', $defaultLifetime)

Parameters

$redisClient
$namespace
$defaultLifetime

at line line 75
static Redis|Client createConnection(string $dsn, array $options = array())

Creates a Redis connection using a DSN configuration.

Example DSN: - redis://localhost - redis://example.com:1234 - redis://secret@example.com/13 - redis:///var/run/redis.sock - redis://secret@/var/run/redis.sock/13

Parameters

string $dsn
array $options See self::$defaultConnectionOptions

Return Value

Redis|Client According to the "class" option

Exceptions

InvalidArgumentException when the DSN is invalid