PHP Класс CacheEngine

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AvailableEngines ( $p_path = null ) : array Returns an array of available engines containing engine name -> info pairs.
Factory ( $p_engineName, $p_path = null ) : boolean Loads the engine specified by the given name.
addValue ( $p_key, $p_value, $p_ttl ) : boolean Inserts the value identified by the given key in the cache.
clearPages ( ) : void Deletes the pages stored in the cache.
clearValues ( ) : void Deletes the values stored in the cache.
deletePage ( $p_key ) : void Delete the page identified by the given key from the cache.
deleteValue ( $p_key ) : void Delete the value identified by the given key from the cache.
description ( ) : string Returns a short description of the cache engine.
fetchValue ( $p_key ) : mixed Fetches the value identified by the given key from the cache.
garbageCollector ( ) : void Deletes the expired values and pages stored in the cache.
getInfo ( $p_type = self::CACHE_VALUES_INFO ) : array Returns an array of cached data; false if invalid type.
getMemInfo ( ) : array Returns an array of shared memory data
getName ( )
hasValueKey ( $p_key ) : mixed Returns true if a value identified by the given key was stored in the cache.
isSupported ( ) : boolean Returns true if the engine was supported in PHP, false otherwise.
pageCachingSupported ( ) : boolean Returns true if the page caching was supported, false otherwise.
storePage ( $p_key, $p_value, $p_ttl ) : boolean Stores the current page under the given key (identifier).
storeValue ( $p_key, $p_value, $p_ttl ) : boolean Stores the value identified by the given key in the cache.

Описание методов

AvailableEngines() публичный статический Метод

Returns an array of available engines containing engine name -> info pairs.
public static AvailableEngines ( $p_path = null ) : array
$p_path
Результат array

Factory() публичный статический Метод

Loads the engine specified by the given name.
public static Factory ( $p_engineName, $p_path = null ) : boolean
$p_engineName
Результат boolean

addValue() абстрактный публичный Метод

Returns false if the key already existed and does not overwrite the existing key.
abstract public addValue ( $p_key, $p_value, $p_ttl ) : boolean
$p_key
$p_value
Результат boolean

clearPages() абстрактный публичный Метод

Deletes the pages stored in the cache.
abstract public clearPages ( ) : void
Результат void

clearValues() абстрактный публичный Метод

Deletes the values stored in the cache.
abstract public clearValues ( ) : void
Результат void

deletePage() абстрактный публичный Метод

Delete the page identified by the given key from the cache.
abstract public deletePage ( $p_key ) : void
Результат void

deleteValue() абстрактный публичный Метод

Delete the value identified by the given key from the cache.
abstract public deleteValue ( $p_key ) : void
Результат void

description() абстрактный публичный Метод

Returns a short description of the cache engine.
abstract public description ( ) : string
Результат string

fetchValue() абстрактный публичный Метод

Fetches the value identified by the given key from the cache.
abstract public fetchValue ( $p_key ) : mixed
Результат mixed

garbageCollector() абстрактный публичный Метод

Deletes the expired values and pages stored in the cache.
abstract public garbageCollector ( ) : void
Результат void

getInfo() абстрактный публичный Метод

Returns an array of cached data; false if invalid type.
abstract public getInfo ( $p_type = self::CACHE_VALUES_INFO ) : array
$p_type
Результат array

getMemInfo() абстрактный публичный Метод

Returns an array of shared memory data
abstract public getMemInfo ( ) : array
Результат array

getName() абстрактный публичный Метод

abstract public getName ( )

hasValueKey() абстрактный публичный Метод

Returns true if a value identified by the given key was stored in the cache.
abstract public hasValueKey ( $p_key ) : mixed
Результат mixed

isSupported() абстрактный публичный Метод

Returns true if the engine was supported in PHP, false otherwise.
abstract public isSupported ( ) : boolean
Результат boolean

pageCachingSupported() абстрактный публичный Метод

Returns true if the page caching was supported, false otherwise.
abstract public pageCachingSupported ( ) : boolean
Результат boolean

storePage() абстрактный публичный Метод

Returns true on success, false on failure.
abstract public storePage ( $p_key, $p_value, $p_ttl ) : boolean
$p_key
$p_value
Результат boolean

storeValue() абстрактный публичный Метод

Returns true on success, false on failure.
abstract public storeValue ( $p_key, $p_value, $p_ttl ) : boolean
$p_key
$p_value
Результат boolean