public static function get($key)
    {
        if (!$cache = self::getInstance()) {
            return false;
        }

        $key = self::prepare($key);

        try {
            if ($cache->hasItem($key)) {
                $item = $cache->getItem($key);
                if ($item->isHit()) {
                    return $item->get();
                }
            }
        } catch (InvalidArgumentException $e) {
            // something going wrong
            Logger::error($e->getMessage());
        }

        return false;
    }
public static function get($key)
    {
        if (!$cache = self::getInstance()) {
            return false;
        }

        $key = self::prepare($key);

        try {
            if ($cache->hasItem($key)) {
                $item = $cache->getItem($key);
                if ($item->isHit()) {
                    return $item->get();
                }
            }
        } catch (InvalidArgumentException $e) {
            // something going wrong
            Logger::error($e->getMessage());
        }

        return false;
    }
public static function get ( $ key ) { if ( ! $ cache = self :: getInstance ( ) ) { return false ; } $ key = self :: prepare ( $ key ) ; try { if ( $ cache -> hasItem ( $ key ) ) { $ item = $ cache -> getItem ( $ key ) ; if ( $ item -> isHit ( ) ) { return $ item -> get ( ) ; } } } catch ( InvalidArgumentException $ e ) { // something going wrong Logger :: error ( $ e -> getMessage ( ) ) ; } return false ; }
Get value of cache item

@param  string $key

@return mixed
Get value of cache item