views:

26

answers:

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 {

    }