public function readFrom(string $key)
    {
        $result = false;

        if ($this->skipCache()) {
            $this->warnings[] = 'Skipping read from cache';

            return $result;
        }

        $cachedData = CakeCache::read($key, $this->getConfig());
        if (!$this->isValidCache($cachedData)) {
            CakeCache::delete($key, $this->getConfig());

            return $result;
        }
        $result = $cachedData['data'];

        return $result;
    }
public function readFrom(string $key)
    {
        $result = false;

        if ($this->skipCache()) {
            $this->warnings[] = 'Skipping read from cache';

            return $result;
        }

        $cachedData = CakeCache::read($key, $this->getConfig());
        if (!$this->isValidCache($cachedData)) {
            CakeCache::delete($key, $this->getConfig());

            return $result;
        }
        $result = $cachedData['data'];

        return $result;
    }
public function readFrom ( string $ key ) { $ result = false ; if ( $ this -> skipCache ( ) ) { $ this -> warnings [ ] = 'Skipping read from cache' ; return $ result ; } $ cachedData = CakeCache :: read ( $ key , $ this -> getConfig ( ) ) ; if ( ! $ this -> isValidCache ( $ cachedData ) ) { CakeCache :: delete ( $ key , $ this -> getConfig ( ) ) ; return $ result ; } $ result = $ cachedData [ 'data' ] ; return $ result ; }
Read cached value from a given key

@param string $key Cache key
@return mixed False on failure, cached value otherwise
Read cached value from a given key