1

I want to use Zend_Cache_Frontend_Output to cache certain sections of my page, I have the cache working but can't get the view helper to render into the cache (the cache entry has data but not the view being rendered). Here's my code but can someone tell me the correct method:

    if (!($this->_outputCache->start('page_'.$this->getRequest()->getActionName()))) {
        $page = new Default_Model_Pages(array('rewrite'=>Zend_Registry::get('requestedController')));
        if (!$page->id()) $this->pageNotFound();
        $this->view->headTitle()->prepend($page->windowTitle);
        if(file_exists(SITE_PATH.'/skins/'.$siteConf->skin.'/modules/default/index/'.$page->title.'.phtml')) $this->_helper->viewRenderer($page->title);
        else $this->_helper->viewRenderer('defaultview');
        $this->view->render($this->_helper->viewRenderer());
        $this->_outputCache->end();
    } else {

    }

1 Answer 1

1

Could it be your call to render() method is just missing an echo?

echo $this->view->render($this->_helper->viewRenderer());
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.