title: Zend Framework: Cache render
body: <p>I want to use <a href="http://framework.zend.com/manual/en/zend.cache.frontends.html#zend.cache.frontends.output" rel="nofollow noreferrer">Zend_Cache_Frontend_Output</a> 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:</p>
  
  <pre><code>    if (!($this-&gt;_outputCache-&gt;start('page_'.$this-&gt;getRequest()-&gt;getActionName()))) {
          $page = new Default_Model_Pages(array('rewrite'=&gt;Zend_Registry::get('requestedController')));
          if (!$page-&gt;id()) $this-&gt;pageNotFound();
          $this-&gt;view-&gt;headTitle()-&gt;prepend($page-&gt;windowTitle);
          if(file_exists(SITE_PATH.'/skins/'.$siteConf-&gt;skin.'/modules/default/index/'.$page-&gt;title.'.phtml')) $this-&gt;_helper-&gt;viewRenderer($page-&gt;title);
          else $this-&gt;_helper-&gt;viewRenderer('defaultview');
          $this-&gt;view-&gt;render($this-&gt;_helper-&gt;viewRenderer());
          $this-&gt;_outputCache-&gt;end();
      } else {
  
      }
  </code></pre>