/** * Invalidate the query cache * * @return void */ protected function invalidateQueryCache() { if ($this->queryCache) { $this->queryCache->clear(); $this->logger->log("Query cache invalidated", \Elgg\Logger::INFO); } }
/** * Includes view PHP or static file * * @param string $view The view name * @param array $vars Variables passed to view * @param string $viewtype The viewtype * @param bool $issue_missing_notice Log a notice if the view is missing * * @return string|false output generated by view file inclusion or false */ private function renderViewFile($view, array $vars, $viewtype, $issue_missing_notice) { $file = $this->findViewFile($view, $viewtype); if (!$file) { if ($issue_missing_notice) { $this->logger->log("{$viewtype}/{$view} view does not exist.", 'NOTICE'); } return false; } if (pathinfo($file, PATHINFO_EXTENSION) === 'php') { ob_start(); include $file; return ob_get_clean(); } return file_get_contents($file); }