+ Reply to Thread
Results 1 to 3 of 3

Thread: Zend Cache not working using Action Helper

  1. #1
    georgecrawford is offline Junior Member
    Join Date
    Mar 2010
    Posts
    2

    Default Zend Cache not working using Action Helper

    Hi,

    I'm trying to implement full page static caching in my Zend Framework application. Using the Static backend coupled with the Capture frontend, whole pages can be cached, and served by a .htaccess redirect in the future, until the cache is deleted/regenerated. For reference, I've been using the section on Zend_Cache_Backend_Static in the manual, and also some further information provided by the class author.

    As per the example, I have configured the directories for the cache (static HTML files) and their tags, and I have added the line:
    Code:
    $this->_helper->cache(array('index'), array('allentries'));
    to one of my controllers.

    The HTML file is created in the correct place, and the tags are also created as expected. However, the HTMl file is always blank - 0 bytes.

    I can't diagnose the problem, and I can't find any information online to help. As far as I can see it's some problem with the Output Buffering callback which receives the output from the Zend app, but I don't know precisely what's wrong.

    Can anybody shed some light on the issue?

  2. #2
    georgecrawford is offline Junior Member
    Join Date
    Mar 2010
    Posts
    2

    Default

    It seems as if the ob_start callback function is being passed an empty string every time. If I append the string 'test' to the data inside the Zend_Cache_Frontend_Capture::_flush method, only the string 'test' is written to the HTML file.

    Any idea why the callback isn't receiving the HTML contents of the generated page?

  3. #3
    sverdier is offline Junior Member
    Join Date
    Mar 2010
    Posts
    1

    Default

    I had the same problem, says this is it will work :
    $front->setParam('disableOutputBuffering', true);

+ Reply to Thread

Similar Threads

  1. Zend Page Cache not working
    By joshmaker in forum Core Infrastructure
    Replies: 7
    Last Post: 12-21-2009, 10:02 PM
  2. Retrive ACL from an action helper by a view helper
    By Arjuna in forum Authentication & Authorization
    Replies: 2
    Last Post: 11-16-2008, 03:50 PM
  3. Zend Router Controller Action Helper Url - URL Rewriting
    By DarKA in forum Model-View-Controller (MVC)
    Replies: 0
    Last Post: 10-02-2008, 12:08 PM
  4. Why is url view helper not working how I exect?
    By nozavroni in forum Model-View-Controller (MVC)
    Replies: 3
    Last Post: 09-29-2008, 10:34 AM
  5. Action Helper by name NotifyPreDispatch not found when debugging (Zend Debugger)
    By lordspace in forum General Q&A on Zend Framework
    Replies: 2
    Last Post: 05-02-2008, 12:13 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts