src/Common/Traits/Caching.php
protected function getCache($sKey, $bReturnValue = true)
    {
        if (!static::$CACHING_ENABLED) {
            return false;
        } elseif (empty($sKey)) {
            return false;
        }

        $sCacheKey = $this->getCachePrefix() . $sKey;
        foreach ($this->aCache as $iIndex => $oCacheItem) {
            if (in_array($sCacheKey, $oCacheItem->key)) {
                return $bReturnValue ? $oCacheItem->value : $iIndex;
            }
        }

        return null;
    }
protected function getCache($sKey, $bReturnValue = true)
    {
        if (!static::$CACHING_ENABLED) {
            return false;
        } elseif (empty($sKey)) {
            return false;
        }

        $sCacheKey = $this->getCachePrefix() . $sKey;
        foreach ($this->aCache as $iIndex => $oCacheItem) {
            if (in_array($sCacheKey, $oCacheItem->key)) {
                return $bReturnValue ? $oCacheItem->value : $iIndex;
            }
        }

        return null;
    }
protected function getCache ( $ sKey , $ bReturnValue = true ) { if ( ! static :: $ CACHING_ENABLED ) { return false ; } elseif ( empty ( $ sKey ) ) { return false ; } $ sCacheKey = $ this -> getCachePrefix ( ) . $ sKey ; foreach ( $ this -> aCache as $ iIndex => $ oCacheItem ) { if ( in_array ( $ sCacheKey , $ oCacheItem -> key ) ) { return $ bReturnValue ? $ oCacheItem -> value : $ iIndex ; } } return null ; }
Fetches an item from the cache

@param string  $sKey         The cache key
@param boolean $bReturnValue Whether to return the value, or the index in the cache array

@return mixed
Fetches an item from the cache