\FAA\Handler\MemoryCacheRedis

Summary

Methods
Properties
Constants
__construct()
HasConnection()
Information()
Keys()
Scan()
DeleteByPattern()
Read()
Write()
Delete()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
extractFolder()
pathToKey()
$interface
$prefix
N/A

Properties

$interface

$interface :\Predis\Client

The interface Local Redis client interface storage

Type

\Predis\Client—A redis client instance

$prefix

$prefix :string

The prefix The folder prefix for all stored key root entries

Type

string—A prefix for all keys stored

Methods

__construct()

__construct(string  $prefix)

Redis constructor.

Connect to redis server and start the interface.

Parameters

string $prefix

The cache setup prefix

HasConnection()

HasConnection(): boolean

Check if is connected Connects to memcache handler and returns connection status.

Returns

boolean —

Connection possible

Information()

Information(string  $pattern): \FAA\Obj\Result

Get list of information keys Evaluate the search pattern and return the found information keys

Parameters

string $pattern

Search pattern

Returns

\FAA\Obj\Result —

A list of found keys

Keys()

Keys(string  $pattern): array

Get list of keys Evaluate the search pattern and return the found top level keys

Parameters

string $pattern

Search pattern

Returns

array —

A list of found keys

Scan()

Scan(string  $key,string  $pattern): array

Parameters

string $key

Key to search in

string $pattern

The pattern to search for

Returns

array —

The list of found key value pairs

DeleteByPattern()

DeleteByPattern(string  $pattern): boolean

Delete by key Delete the entries by given search key pattern

Parameters

string $pattern

Search pattern

Returns

boolean —

Connection possible and key deleted

Read()

Read(string  $cache_file,boolean  $raw = false): mixed

Read cache file from storage Get the values from cache file from storage, do deserialize when not raw

Parameters

string $cache_file

Relative file path

boolean $raw

When set to true, return the value direct without deserialize.

Returns

mixed —

The stored values

Write()

Write(string  $cache_file,mixed  $data,boolean  $raw = false,integer  $ttl = -1): mixed

Write cache file to storage Set the values of cache file to storage, do serialize when not raw

Parameters

string $cache_file

Relative file path

mixed $data

The data to store

boolean $raw

When set to true, return the value direct without deserialize.

integer $ttl

Optional time to live.

Returns

mixed —

The stored values

Delete()

Delete(string  $cache_file): mixed

Delete cache file from storage Remove the values from cache file from storage

Parameters

string $cache_file

Relative file path

Returns

mixed —

The stored values

extractFolder()

extractFolder(  $cache_file)

Parameters

$cache_file

pathToKey()

pathToKey(  $cache_file)

Parameters

$cache_file