Свойство | Type | Description | |
---|---|---|---|
$items | array | ||
$limit | integer | ||
$size | integer |
Méthode | Description | |
---|---|---|
__construct ( integer | string $limit = null ) | ||
add ( $key, $value, $expire ) | ||
cas ( $token, $key, $value, $expire ) | ||
decrement ( $key, $offset = 1, $initial, $expire ) | ||
delete ( $key ) | ||
deleteMulti ( array $keys ) | ||
flush ( ) | ||
get ( $key, &$token = null ) | ||
getMulti ( array $keys, array &$tokens = null ) | ||
increment ( $key, $offset = 1, $initial, $expire ) | ||
replace ( $key, $value, $expire ) | ||
set ( $key, $value, $expire ) | ||
setMulti ( array $items, $expire ) | ||
touch ( $key, $expire ) |
Méthode | Description | |
---|---|---|
doIncrement ( string $key, integer $offset, integer $initial, integer $expire ) : integer | boolean | Shared between increment/decrement: both have mostly the same logic (decrement just increments a negative value), but need their validation split up (increment won't accept negative values). | |
evict ( ) | Least recently used cache values will be evicted from cache should it fill up too much. | |
exists ( string $key ) : boolean | Checks if a value exists in cache and is not yet expired. | |
lru ( $key ) | This cache uses least recently used algorithm. This is to be called with the key to be marked as just used. | |
normalizeTime ( integer $time ) : integer | Times can be: * relative (in seconds) to current time, within 30 days * absolute unix timestamp * 0, for infinity. | |
shorthandToBytes ( string | integer $shorthand ) : integer | Understands shorthand byte values (as used in e.g. memory_limit ini setting) and converts them into bytes. |
public __construct ( integer | string $limit = null ) | ||
$limit | integer | string | Memory limit in bytes (defaults to 10% of memory_limit) |
protected evict ( ) |
protected lru ( $key ) |
protected normalizeTime ( integer $time ) : integer | ||
$time | integer | |
Résultat | integer |