Method |
Description |
|
__construct ( string $ID = '' ) |
|
|
add ( string $key, mixed $value, integer $ttl = 259200, array | string $tags = NULL ) : boolean |
Add value to memory storage, only if this key does not exists (or false will be returned). |
|
del ( string | array $key ) : boolean |
Delete key or array of keys from storage |
|
del_by_tags ( array | string $tags ) : boolean |
Delete keys by tags |
|
del_old ( ) : boolean |
Delete old (by ttl) variables from storage
It's very important function to prevent APC's cache fragmentation. |
|
getKeyTTL ( string $key ) : integer |
Returns, how many seconds left till key expiring. |
|
get_ID ( ) |
|
|
get_keys ( ) |
Return array of all stored keys |
|
get_stat ( ) : array |
|
|
increment ( string $key, mixed $by_value = 1, integer $limit_keys_count, integer $ttl = 259200 ) : integer | string | array |
Increment value of the key |
|
lock_key ( mixed $key, mixed &$auto_unlocker_variable ) : boolean |
Get exclusive mutex for key. Key will be still accessible to read and write, but
another process can exclude dog-pile effect, if before updating the key he will try to get this mutex. |
|
read ( string | array $key, mixed &$ttl_left ) : mixed |
Read data from memory storage |
|
save ( string $key, mixed $value, integer $ttl = 259200, array | string $tags = NULL ) : boolean |
Save variable in memory storage |
|
select_fx ( callable $fx, boolean $get_array = false ) : mixed |
Select from storage via callback function |
|
set_ID ( $ID ) |
|
|
set_tags ( string $key, string | array $tags, integer $ttl = self::max_ttl ) : boolean |
Associate tags with keys |
|
unlock_key ( KeyAutoUnlocker $auto_unlocker ) : boolean |
Unlock key, locked by method 'lock_key' |
|