public function load($id, $bypassCheck = true, \DateTime $expire = null)
    {
        if (null === $expire) {
            $expire = new \DateTime();
        }

        $last_timestamp = $this->test($id);

        if (true === $bypassCheck) {
            $last_timestamp = 0;
        }

        if (true === $bypassCheck || 0 === $last_timestamp || $expire->getTimestamp() <= $last_timestamp) {
            if (false === $this->result) {
                return $this->_onError('load');
            }

            return $this->result;
        }

        return false;
    }
public function load($id, $bypassCheck = true, \DateTime $expire = null)
    {
        if (null === $expire) {
            $expire = new \DateTime();
        }

        $last_timestamp = $this->test($id);

        if (true === $bypassCheck) {
            $last_timestamp = 0;
        }

        if (true === $bypassCheck || 0 === $last_timestamp || $expire->getTimestamp() <= $last_timestamp) {
            if (false === $this->result) {
                return $this->_onError('load');
            }

            return $this->result;
        }

        return false;
    }
public function load ( $ id , $ bypassCheck = true , \ DateTime $ expire = null ) { if ( null === $ expire ) { $ expire = new \ DateTime ( ) ; } $ last_timestamp = $ this -> test ( $ id ) ; if ( true === $ bypassCheck ) { $ last_timestamp = 0 ; } if ( true === $ bypassCheck || 0 === $ last_timestamp || $ expire -> getTimestamp ( ) <= $ last_timestamp ) { if ( false === $ this -> result ) { return $ this -> _onError ( 'load' ) ; } return $ this -> result ; } return false ; }
Returns the available cache for the given id if found returns FALSE else.

@param string    $id          Cache id
@param boolean   $bypassCheck Allow to find cache without test it before
@param \DateTime $expire      Optionnal, the expiration time (now by default)

@return string|FALSE
Returns the available cache for the given id if found returns FALSE else .