ZF-1667: Output cache frontend: Page-caching gets garbled on mixing with section-caching

Issue Type: Improvement Created: 2007-07-02T13:09:02.000+0000 Last Updated: 2008-09-02T10:39:30.000+0000 Status: Resolved Fix version(s): - 1.6.0 (02/Sep/08)

Reporter: Shekar Reddy (zendfw) Assignee: Fabien MARTY (fab) Tags: - Zend_Cache

Related issues: Attachments:


Output caching for the entire page gets garbled if there are any output caching for sections of the same page.

<pre class="highlight">
// Page caching
$pageCache = $cache->start( $pageKey );


   // Section caching
   if ( ! $cache->start( $sectionKey )

if ( ! $pageCache )

The above renders the page garbled :( I thought ob_*() functions could be nested.

Fabien confirmed this was a design issue as the cacheId is not "nested" safely and hence this issue so he could fix it.


Posted by Fabien MARTY (fab) on 2007-07-02T15:43:32.000+0000

it's not a bug, it's a feature

Posted by Darby Felton (darby) on 2007-07-19T16:19:30.000+0000

Assigning to [~fab] to initiate issue review.

Posted by Shekar Reddy (zendfw) on 2008-05-02T14:50:10.000+0000

I'm still having issues with the garbled output. Could you let us know the status of this issue please?

Posted by Fabien MARTY (fab) on 2008-05-18T14:30:46.000+0000

This sounds possible, I will try to implement this for next minor release

Posted by Fabien MARTY (fab) on 2008-05-21T10:49:36.000+0000

I just commited this into SVN trunk. Can you try it ?

Posted by Shekar Reddy (zendfw) on 2008-05-27T22:59:41.000+0000

I tried the Output.php with my existing page code but got the page output rendered for once on cache-miss (ok) but twice on cache-hit instead of once. Not sure if there is anything wrong with my code.

Posted by Fabien MARTY (fab) on 2008-06-06T12:11:39.000+0000

some news about this ? it seems to work for me ?

Posted by Fabien MARTY (fab) on 2008-06-14T02:16:17.000+0000

some news about this ? it seems to work for me ?

Posted by Shekar Reddy (zendfw) on 2008-06-14T12:51:42.000+0000

I have not noticed any code changes in Output.php compared to the earlier version on output buffering. My tests failed on some headers generated using javascript as they did before.

Have you tested this on both earlier and current version of Output.php and seen any difference in behavior? Such as earlier version garbles the output and the current version doesn't?

Posted by Fabien MARTY (fab) on 2008-06-14T13:00:08.000+0000

nested sections works for me in the latest SVN trunk Output.php…

Posted by Fabien MARTY (fab) on 2008-06-20T12:56:28.000+0000

seems to work, please reopen if problem

Posted by Wil Sinclair (wil) on 2008-09-02T10:39:30.000+0000

Updating for the 1.6.0 release.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.