DboSource::getQueryCache PHP Method

getQueryCache() public method

Returns the result for a sql query if it is already cached
public getQueryCache ( string $sql, array $params = [] ) : mixed
$sql string SQL query
$params array query params bound as values
return mixed results for query if it is cached, false otherwise
    public function getQueryCache($sql, $params = array())
    {
        if (isset($this->_queryCache[$sql]) && preg_match('/^\\s*select/i', $sql)) {
            $serialized = serialize($params);
            if (isset($this->_queryCache[$sql][$serialized])) {
                return $this->_queryCache[$sql][$serialized];
            }
        }
        return false;
    }
DboSource