PHP Class Horde_Cache_Storage_Base, horde

Author: Michael Slusarz ([email protected])
Inheritance: implements Serializable
Exibir arquivo Open project: horde/horde Class Usage Examples

Protected Properties

Property Type Description
$_logger Horde_Log_Logger Logger.
$_params array Parameters.

Public Methods

Method Description
__construct ( array $params = [] ) Constructor.
clear ( ) Clears all data from the cache.
exists ( string $key, integer $lifetime ) : boolean Checks if a given key exists in the cache, valid for the given lifetime.
expire ( string $key ) : boolean Expire any existing data for the given key.
get ( string $key, integer $lifetime ) : mixed Retrieve cached data.
serialize ( )
set ( string $key, mixed $data, integer $lifetime ) Store an object in the cache.
setLogger ( Horde_Log_Logger $logger ) Set the logging object.
unserialize ( $data )

Protected Methods

Method Description
_initOb ( ) Do initialization tasks.

Method Details

__construct() public method

Constructor.
public __construct ( array $params = [] )
$params array Configuration parameters.

_initOb() protected method

Do initialization tasks.
protected _initOb ( )

clear() abstract public method

Clears all data from the cache.
abstract public clear ( )

exists() abstract public method

Checks if a given key exists in the cache, valid for the given lifetime.
abstract public exists ( string $key, integer $lifetime ) : boolean
$key string Cache key to check.
$lifetime integer Lifetime of the key in seconds.
return boolean Existence.

expire() abstract public method

Expire any existing data for the given key.
abstract public expire ( string $key ) : boolean
$key string Cache key to expire.
return boolean Success or failure.

get() abstract public method

Retrieve cached data.
abstract public get ( string $key, integer $lifetime ) : mixed
$key string Object ID to query.
$lifetime integer Lifetime of the object in seconds.
return mixed Cached data, or false if none was found.

serialize() public method

public serialize ( )

set() abstract public method

Store an object in the cache.
abstract public set ( string $key, mixed $data, integer $lifetime )
$key string Object ID used as the caching key.
$data mixed Data to store in the cache.
$lifetime integer Object lifetime - i.e. the time before the data becomes available for garbage collection. If 0 will not be GC'd.

setLogger() public method

Set the logging object.
public setLogger ( Horde_Log_Logger $logger )
$logger Horde_Log_Logger Log object.

unserialize() public method

public unserialize ( $data )

Property Details

$_logger protected_oe property

Logger.
protected Horde_Log_Logger $_logger
return Horde_Log_Logger

$_params protected_oe property

Parameters.
protected array $_params
return array