PHP 클래스 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.
저자: Magnus Nordlander ([email protected])
상속: implements Cache\Taggable\TaggablePoolInterface, use trait TaggablePoolTrait
파일 보기 프로젝트 열기: php-cache/cache 1 사용 예제들

공개 메소드들

메소드 설명
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 )

보호된 메소드들

메소드 설명
appendListItem ( $name, $value )
getList ( $name )
getTagKey ( $tag )
removeList ( $name )
removeListItem ( $name, $key )

비공개 메소드들

메소드 설명
__construct ( Psr\Cache\CacheItemPoolInterface $cachePool, Psr\Cache\CacheItemPoolInterface $tagStorePool = null )

메소드 상세

appendListItem() 보호된 메소드

protected appendListItem ( $name, $value )

clear() 공개 메소드

public clear ( )

commit() 공개 메소드

public commit ( )

deleteItem() 공개 메소드

public deleteItem ( $key )

deleteItems() 공개 메소드

public deleteItems ( array $keys )
$keys array

getItem() 공개 메소드

public getItem ( $key )

getItems() 공개 메소드

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

getList() 보호된 메소드

protected getList ( $name )

getTagKey() 보호된 메소드

protected getTagKey ( $tag )

hasItem() 공개 메소드

public hasItem ( $key )

makeTaggable() 공개 정적인 메소드

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.
리턴 Cache\Taggable\TaggablePoolInterface

removeList() 보호된 메소드

protected removeList ( $name )

removeListItem() 보호된 메소드

protected removeListItem ( $name, $key )

save() 공개 메소드

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

saveDeferred() 공개 메소드

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