Property | Type | Description | |
---|---|---|---|
$_logger | Horde_Log_Logger | Logger. | |
$_params | array | Cache parameters. | |
$_storage | Horde_Cache_Storage | Storage object. |
Method | Description | |
---|---|---|
__construct ( Horde_Cache_Storage_Base $storage, array $params = [] ) | Constructor. | |
clear ( ) | Clears all data from the cache. | |
exists ( string $key, integer $lifetime = 1 ) : 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 = 1 ) : mixed | Retrieve cached data. | |
output ( string $key, integer $lifetime = 1 ) : boolean | Attempts to directly output a cached object. | |
set ( string $key, string $data, integer $lifetime = null ) | Store an object in the cache. | |
testReadWrite ( ) : boolean | Tests the driver for read/write access. |
public __construct ( Horde_Cache_Storage_Base $storage, array $params = [] ) | ||
$storage | Horde_Cache_Storage_Base | The storage object. |
$params | array | Parameter array:
- compress: (boolean) Compress data (if possible)? DEFAULT: false - lifetime: (integer) Lifetime of data, in seconds. DEFAULT: 86400 seconds - logger: (Horde_Log_Logger) Log object to use for log/debug messages. |
public set ( string $key, string $data, integer $lifetime = null ) | ||
$key | string | Object ID used as the caching key. |
$data | string | Data to store in the cache. |
$lifetime | integer | Object lifetime - i.e. the time before the data becomes available for garbage collection, in seconds. If null use the default Horde GC time. If 0 will not be GC'd. |
public testReadWrite ( ) : boolean | ||
return | boolean | True if read/write is available. |