trait RedisTrait

Methods

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

Creates a Redis connection using a DSN configuration.

doFetch(array $ids)

{@inheritdoc}

doHave($id)

{@inheritdoc}

doClear($namespace)

{@inheritdoc}

doDelete(array $ids)

{@inheritdoc}

doSave(array $values, $lifetime)

{@inheritdoc}

Details

at line 81
static Redis|RedisCluster|Client createConnection(string $dsn, array $options = [])

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|RedisCluster|Client According to the "class" option

Exceptions

InvalidArgumentException when the DSN is invalid

at line 279
protected doFetch(array $ids)

{@inheritdoc}

Parameters

array $ids

at line 309
protected doHave($id)

{@inheritdoc}

Parameters

$id

at line 317
protected doClear($namespace)

{@inheritdoc}

Parameters

$namespace

at line 382
protected doDelete(array $ids)

{@inheritdoc}

Parameters

array $ids

at line 404
protected doSave(array $values, $lifetime)

{@inheritdoc}

Parameters

array $values
$lifetime