protected function getValue($key)
    {
        $query = new Query;
        $row = $query->select(['data'])
            ->from($this->cacheCollection)
            ->where([
                'id' => $key,
                '$or' => [
                    [
                        'expire' => 0
                    ],
                    [
                        'expire' => ['$gt' => time()]
                    ],
                ],
            ])
            ->one($this->db);

        if (empty($row)) {
            return false;
        }
        return $row['data'];
    }
protected function getValue($key)
    {
        $query = new Query;
        $row = $query->select(['data'])
            ->from($this->cacheCollection)
            ->where([
                'id' => $key,
                '$or' => [
                    [
                        'expire' => 0
                    ],
                    [
                        'expire' => ['$gt' => time()]
                    ],
                ],
            ])
            ->one($this->db);

        if (empty($row)) {
            return false;
        }
        return $row['data'];
    }
protected function getValue ( $ key ) { $ query = new Query ; $ row = $ query -> select ( [ 'data' ] ) -> from ( $ this -> cacheCollection ) -> where ( [ 'id' => $ key , '$or' => [ [ 'expire' => 0 ] , [ 'expire' => [ '$gt' => time ( ) ] ] , ] , ] ) -> one ( $ this -> db ) ; if ( empty ( $ row ) ) { return false ; } return $ row [ 'data' ] ; }
Retrieves a value from cache with a specified key.
This method should be implemented by child classes to retrieve the data
from specific cache storage.
@param string $key a unique key identifying the cached value
@return string|bool the value stored in cache, false if the value is not in the cache or expired.
Retrieves a value from cache with a specified key . This method should be implemented by child classes to retrieve the data from specific cache storage .