ZF-1667: Output cache frontend: Page-caching gets garbled on mixing with section-caching
Description
Output caching for the entire page gets garbled if there are any output caching for sections of the same page.
// Page caching
$pageCache = $cache->start( $pageKey );
// Section caching
if ( ! $cache->start( $sectionKey )
{
$cache->end()
}
if ( ! $pageCache )
$cache->end()
}
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.
Comments
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
http://framework.zend.com/code/browse/…
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.