Method |
Description |
|
__construct ( string $ID = '', integer $size, integer $maxsize ) |
|
|
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 (from map) |
|
del_by_tags ( array | string $tag ) : boolean |
Delete keys by tags |
|
del_old ( ) : boolean |
Delete old (by ttl) variables from storage (map) |
|
get_ID ( ) |
|
|
get_keys ( ) |
Return array of all stored keys |
|
get_stat ( ) : array |
Returns statistic information |
|
increment ( string $key, mixed $by_value = 1, integer $limit_keys_count, integer $ttl = 259200 ) : integer | string | array |
Increment value of 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, integer &$ttl_left ) : mixed |
Read data from memory storage |
|
save ( string $key, mixed $value, integer $ttl = 259200, string | array $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 ) |
|
|
sort_map ( array $a, array $b ) : integer |
Sort map by start value at map
This function are public only for the function "usort", she should not be used in interface. |
|
unlock_key ( KeyAutoUnlocker $auto_unlocker ) : boolean |
Unlock key, locked by method 'lock_key' |
|