src/Phossa2/Cache/Traits/CacheItemAwareTrait.php
protected function getCacheItem(/*# string */ $key)/*# : CacheItemExtendedInterface */
    {
        // validate key first
        $this->validateKey($key);

        // try local cache
        if ($this->use_item_cache) {
            if (!isset($this->item_cache[$key[0]][$key])) {
                $this->item_cache[$key[0]][$key] = $this->createCacheItem($key);
            }
            return $this->item_cache[$key[0]][$key];
        } else {
            return $this->createCacheItem($key);
        }
    }
protected function getCacheItem(/*# string */ $key)/*# : CacheItemExtendedInterface */
    {
        // validate key first
        $this->validateKey($key);

        // try local cache
        if ($this->use_item_cache) {
            if (!isset($this->item_cache[$key[0]][$key])) {
                $this->item_cache[$key[0]][$key] = $this->createCacheItem($key);
            }
            return $this->item_cache[$key[0]][$key];
        } else {
            return $this->createCacheItem($key);
        }
    }
protected function getCacheItem ( /*# string */ $ key ) /*# : CacheItemExtendedInterface */ { // validate key first $ this -> validateKey ( $ key ) ; // try local cache if ( $ this -> use_item_cache ) { if ( ! isset ( $ this -> item_cache [ $ key [ 0 ] ] [ $ key ] ) ) { $ this -> item_cache [ $ key [ 0 ] ] [ $ key ] = $ this -> createCacheItem ( $ key ) ; } return $ this -> item_cache [ $ key [ 0 ] ] [ $ key ] ; } else { return $ this -> createCacheItem ( $ key ) ; } }
Get a cache item

@param  string $key
@return CacheItemExtendedInterface
@throws InvalidArgumentException if $key is invalid
@access protected
Get a cache item