Page and Static caching each have an additional requirement that output buffering is disabled in the Controller stack. It interferes with what we're trying to do (capture output). I'm clueless as to why the Controller even has output buffering (maybe someone could explain?) but it needs to be disabled for the static cache to operate properly. The Reference Guide for both the static and page caches contains a note explaining which setting to change. It's the most common error leading to empty cache files.
Paddy Pádraic Brady http://blog.astrumfutura.com http://www.survivethedeepend.com OpenID Europe Foundation Irish Representative ________________________________ From: krl <[email protected]> To: [email protected] Sent: Sat, May 29, 2010 1:24:03 PM Subject: [fw-general] Zend_Controller_Action_Helper_Cache Hi I have difficulties in making the Zend_Controller_Action_Helper_Cache function as it should. I created an example project using zf.sh script and then did the necessary modifications as described here: http://framework.zend.com/issues/browse/ZF-9148?focusedCommentId=38409&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_38409 I also changed the owner of the cache directories. Here's what my IndexController.php looks like: class IndexController extends Zend_Controller_Action { public function init() { /* Initialize action controller here */ $this->_helper->cache(array('index'), array('all')); } public function indexAction() { // action body } public function removeAction() { $this->_helper->getHelper('Cache')->removePagesTagged(array('all')); } } The problem is that public/cached/index.html file is created but it's empty. I also tried the Zfplanet project where Zend_Controller_Action_Helper_Cache is used as well and there it worked fine, the cache file was not empty. What might be wrong or missing in my project? Best regards and thank you in advance KRL -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/Zend-Controller-Action-Helper-Cache-tp2235633p2235633.html Sent from the Zend Framework mailing list archive at Nabble.com.
