\FAA\InterfacesMemoryCache

Summary

Methods
Constants
HasConnection()
Keys()
Scan()
DeleteByPattern()
Information()
Read()
Write()
Delete()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

HasConnection()

HasConnection(): boolean

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

Returns

boolean —

Connection possible

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

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

Read()

Read(string  $cache_file,boolean  $raw = false,boolean  $honor_ttl = 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.

boolean $honor_ttl

Load with ttl automatic

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