Methods

__construct()

__construct($identifier, $config) 

Parameters

$identifier

$config

Check if other caches or files have been changed since cache creation

check_dependencies(array $dependencies) : bool

Parameters

$dependencies

array

Returns

bool

Delete Cache

delete() 

Purge all caches

delete_all(string $section) : bool

Parameters

$section

string

limit purge to subsection

Returns

bool

Load a cache, this does the generic post-processing

_get() : bool

Returns

boolsuccess

Get the section index

_get_index() : array

Returns

arraycontaining the identifier, the sections, and the section index

get's the redis key belonging to the cache identifier

_get_key(bool $remove) : string

Parameters

$remove

bool

if true, remove the key retrieved from the index

Returns

string

generate a new unique key for the current identifier

_new_key() : string

Returns

string

Serialize an array

_serialize($data) : string

This function first converts any slashes found in the array to a temporary marker, so when it gets unserialized the slashes will be preserved

Parameters

$data

array

Returns

string

Save a cache, this does the generic pre-processing

_set() : bool

Returns

boolsuccess

Unserialize

_unserialize($data) : string

This function unserializes a data string, then converts any temporary slash markers back to actual slashes

Parameters

$data

array

Returns

string

Update the section index

_update_index(string $key) 

Parameters

$key

string

cache key

validate a driver config value

_validate_config(string $name, mixed $value) : mixed

Parameters

$name

string

name of the config variable to validate

$value

mixed

value

Returns

mixed

Translates a given identifier to a valid redis key

identifier_to_key($identifier) : string

Parameters

$identifier

string

Returns

string

Prepend the cache properties

prep_contents() : string

Returns

string

Remove the prepended cache properties and save them in class properties

unprep_contents($payload) 

Parameters

$payload

string

Exceptions

\UnexpectedValueException

 Properties

 

<p>driver specific configuration</p>

$config : array

 

$redis

$redis 

 Constants

 

PROPS_TAG

PROPS_TAG 

const string Tag used for opening & closing cache properties