Prado\Caching\TSqliteCache::getValue PHP Method

getValue() protected method

This is the implementation of the method declared in the parent class.
protected getValue ( $key ) : string
return string the value stored in cache, false if the value is not in the cache or expired.
    protected function getValue($key)
    {
        $sql = 'SELECT value FROM ' . self::CACHE_TABLE . ' WHERE key=\'' . $key . '\' AND (expire=0 OR expire>' . time() . ') LIMIT 1';
        if (($ret = $this->_db->query($sql)) != false && ($row = $ret->fetch(SQLITE_ASSOC)) !== false) {
            return unserialize($row['value']);
        } else {
            return false;
        }
    }