$core->renderPage(); $core->template->constants['ACTION'] = $core->action; // yes, render could change it $core->template->constants['CONTEXT'] = $core->context_str; $core->showHeaders(); $PAGE = $core->showTemplate(); unset($core->template); } if (!$is404 && $core->action == '404') { // add on 404 cache if it was a 404 and not on the cache if (!is_array($core->dimconfig['_404cache'])) { $core->dimconfig['_404cache'] = array(); } if (!isset($core->dimconfig['_404cache'][$core->context_str . $core->original_action])) { $core->dimconfig['_404cache'][$core->context_str . $core->original_action] = true; $core->saveConfig(true); } } else { if ($is404 && $core->action != '404') { // remove as 404 if it rendered but was considered 404 in the cache $core->dimconfig['_404cache'][$core->context_str . $core->original_action] = false; unset($core->dimconfig['_404cache'][$core->context_str . $core->original_action]); $core->saveConfig(true); } } # ab -n50 total mean: 417ms 76ms 50ms 47ms # -- build headers $core->headerControl->showHeaders(); } else { // when serving a file directly, these were not set because checkAction was never loaded $_SESSION[CONS_SESSION_ACCESS_LEVEL] = CONS_SESSION_ACCESS_LEVEL_GUEST;