src/Common/Traits/Caching.php
protected function setCacheAlias($sAliasKey, $sOriginalKey)
    {
        if (!static::$CACHING_ENABLED) {
            return false;
        } elseif (empty($sAliasKey) || empty($sOriginalKey)) {
            return false;
        }

        $sOriginalCacheKey = $this->getCache($sOriginalKey, false);

        if (is_null($sOriginalCacheKey)) {
            return false;
        }

        $this->aCache[$sOriginalCacheKey]->key[] = $this->getCachePrefix() . $sAliasKey;
        $this->aCache[$sOriginalCacheKey]->key   = array_unique($this->aCache[$sOriginalCacheKey]->key);

        // --------------------------------------------------------------------------

        return true;
    }
protected function setCacheAlias($sAliasKey, $sOriginalKey)
    {
        if (!static::$CACHING_ENABLED) {
            return false;
        } elseif (empty($sAliasKey) || empty($sOriginalKey)) {
            return false;
        }

        $sOriginalCacheKey = $this->getCache($sOriginalKey, false);

        if (is_null($sOriginalCacheKey)) {
            return false;
        }

        $this->aCache[$sOriginalCacheKey]->key[] = $this->getCachePrefix() . $sAliasKey;
        $this->aCache[$sOriginalCacheKey]->key   = array_unique($this->aCache[$sOriginalCacheKey]->key);

        // --------------------------------------------------------------------------

        return true;
    }
protected function setCacheAlias ( $ sAliasKey , $ sOriginalKey ) { if ( ! static :: $ CACHING_ENABLED ) { return false ; } elseif ( empty ( $ sAliasKey ) || empty ( $ sOriginalKey ) ) { return false ; } $ sOriginalCacheKey = $ this -> getCache ( $ sOriginalKey , false ) ; if ( is_null ( $ sOriginalCacheKey ) ) { return false ; } $ this -> aCache [ $ sOriginalCacheKey ] -> key [ ] = $ this -> getCachePrefix ( ) . $ sAliasKey ; $ this -> aCache [ $ sOriginalCacheKey ] -> key = array_unique ( $ this -> aCache [ $ sOriginalCacheKey ] -> key ) ; // -------------------------------------------------------------------------- return true ; }
Adds an additional key to an existing cache item

@param string $sAliasKey    The alias to add
@param string $sOriginalKey The original cache key

@return bool
Adds an additional key to an existing cache item