PHP Class Pimcore\Cache\Backend\Memcached

Deprecation:
Inheritance: extends Zend_Cache_Backend_Memcached
ファイルを表示 Open project: pimcore/pimcore

Protected Properties

Property Type Description
$checkedCacheConsistency boolean
$db Zend_Db_Adapter_Abstract

Public Methods

Method Description
__construct ( array $options = [] )
clean ( string $mode = Zend_Cache::CLEANING_MODE_ALL, array $tags = [] ) : boolean Clean some cache records
getCapabilities ( ) : array
getIdsMatchingAnyTags ( array $tags = [] ) : array
getIdsMatchingTags ( array $tags = [] ) : array
load ( $id, boolean $doNotTestCacheValidity = false ) : void
remove ( string $id ) : boolean
save ( string $data, string $id, array $tags = [], integer $specificLifetime = false ) : boolean Save some string datas into a cache record

Protected Methods

Method Description
checkCacheConsistency ( ) : void
clearTags ( ) : void
getDb ( ) : Zend_Db_Adapter_Abstract
getItemsByTag ( string $tag ) : array
getTagsById ( string $id ) : array
saveTags ( string $id, array $tags ) : void

Method Details

__construct() public method

public __construct ( array $options = [] )
$options array

checkCacheConsistency() protected method

protected checkCacheConsistency ( ) : void
return void

clean() public method

Available modes are : 'all' (default) => remove all cache entries ($tags is not used) 'old' => remove too old cache entries ($tags is not used) 'matchingTag' => remove cache entries matching all given tags ($tags can be an array of strings or a single string) 'notMatchingTag' => remove cache entries not matching one of the given tags ($tags can be an array of strings or a single string)
public clean ( string $mode = Zend_Cache::CLEANING_MODE_ALL, array $tags = [] ) : boolean
$mode string Clean mode
$tags array Array of tags
return boolean True if no problem

clearTags() protected method

protected clearTags ( ) : void
return void

getCapabilities() public method

public getCapabilities ( ) : array
return array

getDb() protected method

protected getDb ( ) : Zend_Db_Adapter_Abstract
return Zend_Db_Adapter_Abstract

getIdsMatchingAnyTags() public method

public getIdsMatchingAnyTags ( array $tags = [] ) : array
$tags array
return array

getIdsMatchingTags() public method

public getIdsMatchingTags ( array $tags = [] ) : array
$tags array
return array

getItemsByTag() protected method

protected getItemsByTag ( string $tag ) : array
$tag string
return array

getTagsById() protected method

protected getTagsById ( string $id ) : array
$id string
return array tags for given id

load() public method

public load ( $id, boolean $doNotTestCacheValidity = false ) : void
$id
$doNotTestCacheValidity boolean
return void

remove() public method

public remove ( string $id ) : boolean
$id string
return boolean true if OK

save() public method

Note : $data is always "string" (serialization is done by the core not by the backend)
public save ( string $data, string $id, array $tags = [], integer $specificLifetime = false ) : boolean
$data string Datas to cache
$id string Cache id
$tags array Array of strings, the cache record will be tagged by each string entry
$specificLifetime integer If != false, set a specific lifetime for this cache record (null => infinite lifetime)
return boolean True if no problem

saveTags() protected method

protected saveTags ( string $id, array $tags ) : void
$id string
$tags array
return void

Property Details

$checkedCacheConsistency protected_oe property

protected bool $checkedCacheConsistency
return boolean

$db protected_oe property

protected Zend_Db_Adapter_Abstract $db
return Zend_Db_Adapter_Abstract