PHP Class MatthiasMullie\Scrapbook\Buffered\BufferedStore

Author: Matthias Mullie ([email protected])
Inheritance: implements MatthiasMullie\Scrapbook\KeyValueStore
Show file Open project: matthiasmullie/scrapbook

Protected Properties

Property Type Description
$local MatthiasMullie\Scrapbook\Buffered\Utils\Buffer Local in-memory storage, for the data we've already requested from or written to the real cache.
$transaction MatthiasMullie\Scrapbook\Buffered\Utils\Transaction All we'll need to add is also buffering non-write results.

Public Methods

Method Description
__construct ( MatthiasMullie\Scrapbook\KeyValueStore $cache )
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 ) In addition to all writes being stored to $local, we'll also keep get() values around ;).
getMulti ( array $keys, array &$tokens = null ) In addition to all writes being stored to $local, we'll also keep get() values around ;).
increment ( $key, $offset = 1, $initial, $expire )
replace ( $key, $value, $expire )
set ( $key, $value, $expire )
setMulti ( array $items, $expire )
touch ( $key, $expire )

Method Details

__construct() public method

public __construct ( MatthiasMullie\Scrapbook\KeyValueStore $cache )
$cache MatthiasMullie\Scrapbook\KeyValueStore The real cache we'll buffer for

add() public method

public add ( $key, $value, $expire )

cas() public method

public cas ( $token, $key, $value, $expire )

decrement() public method

public decrement ( $key, $offset = 1, $initial, $expire )

delete() public method

public delete ( $key )

deleteMulti() public method

public deleteMulti ( array $keys )
$keys array

flush() public method

public flush ( )

get() public method

public get ( $key, &$token = null )

getMulti() public method

public getMulti ( array $keys, array &$tokens = null )
$keys array
$tokens array

increment() public method

public increment ( $key, $offset = 1, $initial, $expire )

replace() public method

public replace ( $key, $value, $expire )

set() public method

public set ( $key, $value, $expire )

setMulti() public method

public setMulti ( array $items, $expire )
$items array

touch() public method

public touch ( $key, $expire )

Property Details

$local protected property

Local in-memory storage, for the data we've already requested from or written to the real cache.
protected Buffer,MatthiasMullie\Scrapbook\Buffered\Utils $local
return MatthiasMullie\Scrapbook\Buffered\Utils\Buffer

$transaction protected property

All we'll need to add is also buffering non-write results.
protected Transaction,MatthiasMullie\Scrapbook\Buffered\Utils $transaction
return MatthiasMullie\Scrapbook\Buffered\Utils\Transaction