class RedisStashDriver extends AbstractDriver (View source)

Properties

protected Redis|RedisArray|Client $redis

The Redis drivers.

protected $prefix
protected array $keyCache

The cache of indexed keys.

protected $redisArrayOptionNames

Methods

setOptions(array $options = [])

The options array should contain an array of servers,.

Redis
getRedisInstance(array $servers, int $database = 1)

Decides whether to return a Redis Instance or RedisArray Instance depending on the number of servers passed to it.

getRedisServers(array $servers, int $database)

No description

__destruct()

Properly close the connection.

getData($key)

{@inheritdoc}

storeData($key, $data, $expiration)

{@inheritdoc}

clear($key = null)

{@inheritdoc}

purge()

{@inheritdoc}

static 
isAvailable()

{@inheritdoc}

string
makeKeyString(array $key, bool $path = false)

Turns a key array into a key string. This includes running the indexing functions used to manage the Redis hierarchical storage.

isPersistent()

{@inheritdoc}

Details

protected setOptions(array $options = [])

The options array should contain an array of servers,.

The "server" option expects an array of servers, with each server being represented by an associative array. Each redis config must have either a "socket" or a "server" value, and optional "port" and "ttl" values (with the ttl representing server timeout, not cache expiration).

The "database" option lets developers specific which specific database to use.

The "password" option is used for clusters which required authentication.

Parameters

array $options

The concrete.cache.levels.{level}.drivers.redis.options config item

private Redis getRedisInstance(array $servers, int $database = 1)

Decides whether to return a Redis Instance or RedisArray Instance depending on the number of servers passed to it.

Parameters

array $servers

The concrete.session.servers or concrete.session.redis.servers config item

int $database

Return Value

Redis

| \RedisArray | \Predis\Client

private getRedisServers(array $servers, int $database)

No description

Parameters

array $servers
int $database

__destruct()

Properly close the connection.

getData($key)

{@inheritdoc}

Parameters

$key

storeData($key, $data, $expiration)

{@inheritdoc}

Parameters

$key
$data
$expiration

clear($key = null)

{@inheritdoc}

Parameters

$key

purge()

{@inheritdoc}

static isAvailable()

{@inheritdoc}

protected string makeKeyString(array $key, bool $path = false)

Turns a key array into a key string. This includes running the indexing functions used to manage the Redis hierarchical storage.

When requested the actual path, rather than a normalized value, is returned.

Parameters

array $key
bool $path

Return Value

string

isPersistent()

{@inheritdoc}