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

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

Assigning to [~fab] to initiate issue review.

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

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

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

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.

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

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

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?

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

http://framework.zend.com/code/browse/…

seems to work, please reopen if problem

Updating for the 1.6.0 release.