PHP Class Cache\Taggable\TaggablePSR6PoolAdapter

A general caveat is that using this adapter reserves any cache key starting with '__tag.'. Using the same pool is precarious if your cache does LRU evictions of items even if they do not expire (as in e.g. memcached). If so, the tag item may be evicted without all of the tagged items having been evicted first, causing items to lose their tags. In order to mitigate this issue, you may use a separate, more persistent pool for your tag items. Do however note that if you are doing so, the entire pool is reserved for tags, as this pool is cleared whenever the main pool is cleared.
Author: Magnus Nordlander ([email protected])
Inheritance: implements Cache\Taggable\TaggablePoolInterface, use trait TaggablePoolTrait
Afficher le fichier Open project: php-cache/cache Class Usage Examples

Méthodes publiques

Méthode Description
clear ( )
commit ( )
deleteItem ( $key )
deleteItems ( array $keys )
getItem ( $key )
getItems ( array $keys = [] )
hasItem ( $key )
makeTaggable ( Psr\Cache\CacheItemPoolInterface $cachePool, Psr\Cache\CacheItemPoolInterface $tagStorePool = null ) : Cache\Taggable\TaggablePoolInterface
save ( Psr\Cache\CacheItemInterface $item )
saveDeferred ( Psr\Cache\CacheItemInterface $item )

Méthodes protégées

Méthode Description
appendListItem ( $name, $value )
getList ( $name )
getTagKey ( $tag )
removeList ( $name )
removeListItem ( $name, $key )

Private Methods

Méthode Description
__construct ( Psr\Cache\CacheItemPoolInterface $cachePool, Psr\Cache\CacheItemPoolInterface $tagStorePool = null )

Method Details

appendListItem() protected méthode

protected appendListItem ( $name, $value )

clear() public méthode

public clear ( )

commit() public méthode

public commit ( )

deleteItem() public méthode

public deleteItem ( $key )

deleteItems() public méthode

public deleteItems ( array $keys )
$keys array

getItem() public méthode

public getItem ( $key )

getItems() public méthode

public getItems ( array $keys = [] )
$keys array

getList() protected méthode

protected getList ( $name )

getTagKey() protected méthode

protected getTagKey ( $tag )

hasItem() public méthode

public hasItem ( $key )

makeTaggable() public static méthode

public static makeTaggable ( Psr\Cache\CacheItemPoolInterface $cachePool, Psr\Cache\CacheItemPoolInterface $tagStorePool = null ) : Cache\Taggable\TaggablePoolInterface
$cachePool Psr\Cache\CacheItemPoolInterface The pool to which to add tagging capabilities.
$tagStorePool Psr\Cache\CacheItemPoolInterface The pool to store tags in. If null is passed, the main pool is used.
Résultat Cache\Taggable\TaggablePoolInterface

removeList() protected méthode

protected removeList ( $name )

removeListItem() protected méthode

protected removeListItem ( $name, $key )

save() public méthode

public save ( Psr\Cache\CacheItemInterface $item )
$item Psr\Cache\CacheItemInterface

saveDeferred() public méthode

public saveDeferred ( Psr\Cache\CacheItemInterface $item )
$item Psr\Cache\CacheItemInterface