Свойство | Type | Description | |
---|---|---|---|
$cache | MatthiasMullie\Scrapbook\KeyValueStore | ||
$defer | Deferred updates to be committed to real cache. | ||
$local | |||
$suspend | boolean | Suspend reads from real cache. This is used when a flush is issued but it has not yet been committed. In that case, we don't want to fall back to real cache values, because they're about to be flushed. | |
$tokens | mixed[] | We'll return stub CAS tokens in order to reliably replay the CAS actions to the real cache. This will hold a map of stub token => value, used to verify when we do the actual CAS. |
Méthode | Description | |
---|---|---|
__construct ( |
||
add ( $key, $value, $expire ) | ||
cas ( $token, $key, $value, $expire ) | Since our CAS is deferred, the CAS token we got from our original get() will likely not be valid by the time we want to store it to the real cache. Imagine this scenario: * a value is fetched from (real) cache * an new value key is CAS'ed (into temp cache - real CAS is deferred) * this key's value is fetched again (this time from temp cache) * and a new value is CAS'ed again (into temp cache. | |
commit ( ) : boolean | Commits all deferred updates to real cache. | |
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 ) | ||
rollback ( ) : boolean | Roll back all scheduled changes. | |
set ( $key, $value, $expire ) | ||
setMulti ( array $items, $expire ) | ||
touch ( $key, $expire ) |
Méthode | Description | |
---|---|---|
clear ( ) | Clears all transaction-related data stored in memory. |
public __construct ( |
||
$local | ||
$cache | MatthiasMullie\Scrapbook\KeyValueStore |
public cas ( $token, $key, $value, $expire ) |
protected KeyValueStore,MatthiasMullie\Scrapbook $cache | ||
Résultat | MatthiasMullie\Scrapbook\KeyValueStore |
protected Defer,MatthiasMullie\Scrapbook\Buffered\Utils $defer | ||
Résultat |
protected Buffer,MatthiasMullie\Scrapbook\Buffered\Utils $local | ||
Résultat |
protected bool $suspend | ||
Résultat | boolean |