PHP Trait Cache\Hierarchy\HierarchicalCachePoolTrait

Author: Tobias Nyholm ([email protected])
Mostrar archivo Open project: php-cache/cache

Protected Methods

Method Description
clearHierarchyKeyCache ( ) Clear the cache for the keys.
getHierarchyKey ( string $key, &$pathKey = null ) : string Get a key to use with the hierarchy. If the key does not start with HierarchicalPoolInterface::SEPARATOR this will return an unalterered key. This function supports a tagged key. Ie "foo:bar".
getValueFormStore ( string $key ) : string | null Get a value form the store. This must not be an PoolItemInterface.

Private Methods

Method Description
explodeKey ( $string ) : array This will take a hierarchy key ("|foo|bar") with tags ("|foo|bar!tagHash") and return an array with each level in the hierarchy appended with the tags. ["foo!tagHash", "bar!tagHash"].
isHierarchyKey ( string $key ) : boolean A hierarchy key MUST begin with the separator.

Method Details

clearHierarchyKeyCache() protected method

Clear the cache for the keys.
protected clearHierarchyKeyCache ( )

getHierarchyKey() protected method

Get a key to use with the hierarchy. If the key does not start with HierarchicalPoolInterface::SEPARATOR this will return an unalterered key. This function supports a tagged key. Ie "foo:bar".
protected getHierarchyKey ( string $key, &$pathKey = null ) : string
$key string The original key
return string

getValueFormStore() abstract protected method

Get a value form the store. This must not be an PoolItemInterface.
abstract protected getValueFormStore ( string $key ) : string | null
$key string
return string | null