Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...

When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store



Zend_Cache_Frontend_Output is an output-capturing frontend. It utilizes output buffering in PHP to capture everything between its start() and end() methods.

Available Options

This frontend doesn't have any specific options other than those of Zend_Cache_Core.


An example is given in the manual at the very beginning. Here it is with minor changes:

// if it is a cache miss, output buffering is triggered
if (!($cache->start('mypage'))) {

// output everything as usual
echo 'Hello world! ';
'This is cached ('.time().') ';

$cache->end(); // output buffering ends


'This is never cached ('.time().').';

Using this form it is fairly easy to set up output caching in your already working project with little or no code refactoring.

Zend Framework