PHP Class Pimcore\Cache\Backend\MysqlTable

Inheritance: extends Zend_Cache_Backend, implements Zend_Cache_Backend_ExtendedInterface
Exibir arquivo Open project: pimcore/pimcore

Protected Properties

Property Type Description
$db Zend_Db_Adapter_Abstract

Public Methods

Method Description
clean ( string $mode = Zend_Cache::CLEANING_MODE_ALL, array $tags = [] ) : boolean Clean some cache records
getCapabilities ( ) : array
getFillingPercentage ( ) : integer Return the filling percentage of the backend storage
getIds ( )
getIdsMatchingAnyTags ( array $tags = [] ) : array
getIdsMatchingTags ( array $tags = [] ) : array
getIdsNotMatchingTags ( $tags = [] )
getMetadatas ( $id )
getTags ( ) : array Return an array of stored tags
load ( string $id, boolean $doNotTestCacheValidity = false ) : false | null | string
remove ( string $id ) : boolean
save ( string $data, string $id, array $tags = [], integer $specificLifetime = false ) : boolean Save some string datas into a cache record
test ( $id )
touch ( string $id, integer $extraLifetime ) : boolean Give (if possible) an extra lifetime to the given cache id

Protected Methods

Method Description
getDb ( ) : Zend_Db_Adapter_Abstract
getItemsByTag ( string $tag ) : array
getTagsById ( string $id ) : array
truncate ( )

Method Details

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

getCapabilities() public method

public getCapabilities ( ) : array
return array

getDb() protected method

protected getDb ( ) : Zend_Db_Adapter_Abstract
return Zend_Db_Adapter_Abstract

getFillingPercentage() public method

Return the filling percentage of the backend storage
public getFillingPercentage ( ) : integer
return integer integer between 0 and 100

getIds() public method

public getIds ( )

getIdsMatchingAnyTags() public method

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

getIdsMatchingTags() public method

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

getIdsNotMatchingTags() public method

public getIdsNotMatchingTags ( $tags = [] )

getItemsByTag() protected method

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

getMetadatas() public method

public getMetadatas ( $id )

getTags() public method

Return an array of stored tags
public getTags ( ) : array
return array array of stored tags (string)

getTagsById() protected method

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

load() public method

public load ( string $id, boolean $doNotTestCacheValidity = false ) : false | null | string
$id string
$doNotTestCacheValidity boolean
return false | null | string

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

test() public method

public test ( $id )

touch() public method

Give (if possible) an extra lifetime to the given cache id
public touch ( string $id, integer $extraLifetime ) : boolean
$id string cache id
$extraLifetime integer
return boolean true if ok

truncate() protected method

protected truncate ( )

Property Details

$db protected_oe property

protected Zend_Db_Adapter_Abstract $db
return Zend_Db_Adapter_Abstract