protected function getCachedOutput($oPage, $sCallbackName) { // use callback name as cacheKey + currentpage $sCacheKey = $sCallbackName . "-currentpage-" . AnwActionPage::getCurrentPageName(); try { $oOutputHtml = $oPage->getCachedOutputHtml($sCacheKey); } catch (AnwCacheNotFoundException $e) { // render now... $oContent = $oPage->getContent(); $sRender = $this->{$sCallbackName}($oContent); // build outputhtml... $oOutputHtml = new AnwOutputHtml($oPage); $oOutputHtml->setTitle($oContent->getContentFieldValue(self::FIELD_TITLE, 0, true)); $oOutputHtml->setBody($sRender); // put in cache... $oOutputHtml->putCachedOutputHtml($sCacheKey); } return $oOutputHtml; }