/** * Checks if the previous query had a keep-cache tag. * If so, the cache will persist, otherwise the cache will be flushed. * * Returns TRUE if the cache will remain and FALSE if a flush has * been performed. * * @return boolean */ private function updateCache() { $sql = $this->adapter->getSQL(); if (strpos($sql, '-- keep-cache') !== strlen($sql) - 13) { // If SQL has been taken place outside of this method then something else then // a select query might have happened! (or instruct to keep cache) $this->cache = array(); return FALSE; } return TRUE; }