Properties

$local_buffer

$local_buffer :array

local object cache

Type

array

$redis

$redis :\FAA\Interfaces\MemoryCache

Memory cache interface Buffer the memory cache interface

Type

\FAA\Interfaces\MemoryCache—A memory cache interface

$igbinary

$igbinary :boolean|null

IGBinary available buffer test if "IGBinary" is available

Type

boolean|null—IGBinary is available

$prefix

$prefix :string

The cache prefix To differentiate between different environments use specific prefix in key.

Type

string—The cache key prefix

$search_interface

$search_interface :array<mixed,\FAA\Interfaces\Search>

Store interface Store the search interface instance

Type

array<mixed,\FAA\Interfaces\Search>—A search interface buffer entry list

Methods

Connection()

Connection(): \FAA\Interfaces\MemoryCache

Get the redis server connection Wrapper to get the redis instance and the client connection. This function is cached.

Returns

\FAA\Interfaces\MemoryCache

A memory cache interface

HasIgbinary()

HasIgbinary(): boolean

Check if igbinary is available Returns true when igbinary is enabled and available. This function is cached.

Returns

boolean —

True when igbinary is available

GetSearchInterface()

GetSearchInterface(string  $name = FAA_APPLICATION_SEARCH_HANDLER): \FAA\Interfaces\Search

Get the search server connection Wrapper to get the instance and the client connection. This function is cached.

Parameters

string $name

Get interface of certain type

Returns

\FAA\Interfaces\Search

The client or null when not available.

GetCdnInterface()

GetCdnInterface(): \FAA\Interfaces\ContentDeliveryNetwork

Get cdn interface get access to the cdn interface that was registered for this instance

Returns

\FAA\Interfaces\ContentDeliveryNetwork

System cdn interface

ClearAll()

ClearAll(boolean  $keep_cdn = false,boolean  $drop_all = false): \FAA\Obj\Result

delete all caches wrapper to delete all cache entries

Parameters

boolean $keep_cdn

Keep CDN contents when set to true

boolean $drop_all

Also delete the persistent caches

Returns

\FAA\Obj\Result —

A system result object

ClearAllInFolder()

ClearAllInFolder(string  $cache_folder): \FAA\Obj\Result

delete all caches wrapper to delete all cache entries in a specific section of the system

Parameters

string $cache_folder

The relative path to the cache files

Returns

\FAA\Obj\Result —

A default result object

RecreateIndex()

RecreateIndex(): \FAA\Obj\Result

Recreate the index Recreate the index and clear the caches

Returns

\FAA\Obj\Result

GetPerformanceConfig()

GetPerformanceConfig(): \FAA\Obj\Result

Get performance configuration

Returns

\FAA\Obj\Result —

A result object

GetPhpInfo()

GetPhpInfo(): string

Get php info Execute phpinfo() and return the result as string without head and footer

Returns

string —

The php info output body

GetRedisStorageSize()

GetRedisStorageSize()

UnSerialize()

UnSerialize(mixed  $str,boolean  $raw = false): mixed

get a un serialized var deserialize a given string, use igbinary if possible

Parameters

mixed $str

The values to serialize

boolean $raw

Write as raw data

Returns

mixed —

The un serialized string

Serialize()

Serialize(mixed  $values,boolean  $raw = false): mixed

serialize a value abstraction layer for cache serialization

Parameters

mixed $values

The values to serialize

boolean $raw

Write as raw data

Returns

mixed —

The serialized string

read()

read(string  $cache_file,boolean  $raw = false): \FAA\Obj\Result

read a cache file this function tries to fetch a stored data object from local caches, will use memory cache if it's possible

Parameters

string $cache_file

The path to the cache file, relative to cache folder root

boolean $raw

Read as raw data

Returns

\FAA\Obj\Result —

A default system result object

write()

write(string  $cache_file,mixed  $data,boolean  $raw = false,integer  $ttl = -1): \FAA\Obj\Result

save a cache file and if possible, store in memory if available, store a cache entry also in the local de serialize form as static object

Parameters

string $cache_file

The path to the cache file

mixed $data

The data set to store

boolean $raw

Optional write as raw data

integer $ttl

Optional time to live.

Returns

\FAA\Obj\Result —

A default system result object

delete()

delete(string  $cache_file): \FAA\Obj\Result

delete a cache file and if possible, remove from memory if available, delete a cache entry also in the memory cache and the cosmic cache

Parameters

string $cache_file

The path to the cache file

Returns

\FAA\Obj\Result —

A system result object

escapeId()

escapeId(mixed  $id): mixed

escape an id remove all non suitable values from the id to enable folder creation

Parameters

mixed $id

The id to escape

Returns

mixed —

The cleared id