public static function checkCache() { if (CShell::caching() && ($page = self::isPageReady(PageTool::getVersion(PageTool::getPage(), CShell::pages()), CShell::target(), CShell::duration()))) { echo $page; return true; } return false; }
function render($echo = true) { $this->set('ENV', ENV); $page = PageTool::renderPage($this->page, $this->variables); if ($this->cache && $echo) { $pageName = PageTool::getVersion(PageTool::getPage(), CShell::pages()); $dump = ["page" => $page, "timestamp" => time()]; apc_store($pageName, $dump); } if ($echo) { echo $page; } else { return $page; } }