PHP Class Webmozart\KeyValueStore\Decorator\CachingDecorator

Since: 1.0
Author: Bernhard Schussek ([email protected])
Inheritance: extends AbstractDecorator
显示文件 Open project: webmozart/key-value-store

Public Methods

Method Description
__construct ( Webmozart\KeyValueStore\Api\KeyValueStore $store, Doctrine\Common\Cache\Cache $cache, integer $ttl ) Creates the store.
clear ( )
exists ( $key )
get ( $key, $default = null )
getMultiple ( array $keys, $default = null )
getMultipleOrFail ( array $keys )
getOrFail ( $key )
remove ( $key )
set ( $key, $value )

Method Details

__construct() public method

Creates the store.
public __construct ( Webmozart\KeyValueStore\Api\KeyValueStore $store, Doctrine\Common\Cache\Cache $cache, integer $ttl )
$store Webmozart\KeyValueStore\Api\KeyValueStore The cached store.
$cache Doctrine\Common\Cache\Cache The cache.
$ttl integer The time-to-live for cache entries. If set to 0, cache entries never expire.

clear() public method

public clear ( )

exists() public method

public exists ( $key )

get() public method

public get ( $key, $default = null )

getMultiple() public method

public getMultiple ( array $keys, $default = null )
$keys array

getMultipleOrFail() public method

public getMultipleOrFail ( array $keys )
$keys array

getOrFail() public method

public getOrFail ( $key )

remove() public method

public remove ( $key )

set() public method

public set ( $key, $value )