Zend Framework

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

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0.0
  • Fix Version/s: 1.6.0
  • Component/s: Zend_Cache
  • Labels:
    None
  • Fix Version Priority:
    Should Have

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 );

   <page-content>

   // Section caching
   if ( ! $cache->start( $sectionKey )
   {
      <section-content>
      $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.

Activity

Hide
Fabien MARTY added a comment -

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

Show
Fabien MARTY added a comment - it's not a bug, it's a feature
Hide
Darby Felton added a comment -

Assigning to Fabien MARTY to initiate issue review.

Show
Darby Felton added a comment - Assigning to Fabien MARTY to initiate issue review.
Hide
Shekar Reddy added a comment -

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

Show
Shekar Reddy added a comment - I'm still having issues with the garbled output. Could you let us know the status of this issue please?
Hide
Fabien MARTY added a comment -

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

Show
Fabien MARTY added a comment - This sounds possible, I will try to implement this for next minor release
Hide
Fabien MARTY added a comment -

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

Show
Fabien MARTY added a comment - I just commited this into SVN trunk. Can you try it ?
Hide
Shekar Reddy added a comment -

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.

Show
Shekar Reddy added a comment - 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.
Hide
Fabien MARTY added a comment -

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

Show
Fabien MARTY added a comment - some news about this ? it seems to work for me ?
Hide
Fabien MARTY added a comment -

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

Show
Fabien MARTY added a comment - some news about this ? it seems to work for me ?
Hide
Shekar Reddy added a comment -

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?

Show
Shekar Reddy added a comment - 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?
Hide
Fabien MARTY added a comment -
Show
Fabien MARTY added a comment - nested sections works for me in the latest SVN trunk Output.php http://framework.zend.com/code/browse/~raw,r=9494/Zend_Framework/trunk/library/Zend/Cache/Frontend/Output.php
Hide
Fabien MARTY added a comment -

seems to work, please reopen if problem

Show
Fabien MARTY added a comment - seems to work, please reopen if problem
Hide
Wil Sinclair added a comment -

Updating for the 1.6.0 release.

Show
Wil Sinclair added a comment - Updating for the 1.6.0 release.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: