[Fwd: Cache::Output question / suggestion]

From: Date: Wed, 27 Nov 2002 18:12:49 +0000
Subject: [Fwd: Cache::Output question / suggestion]
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-11185@lists.php.net to get a copy of this message
Since I currently don't have the time to investigate this I'll forward Hans' mail to pear-dev@lists.php.net: Hans Lellelid wrote: > Hi, I am using PEAR::Cache::Output in a web application and would like > to suggest a change to the the Output::start() method. > > In the current version, if caching is disabled the method returns '' > immediately: > > function start($id, $group = 'default') { > if (!$this->caching) > return ''; > // etc..... > } > > I would like to suggest that output buffering is turned on before > returning -- so that if I have functions that are returning the > contents (instead of dumping them to the screen) it won't break if I > turn off caching to test, so, e.g.: > > function start($id, $group = 'default') { > if (!$this->caching) { > ob_start(); > ob_implicit_flush(false); > return ''; > } > // etc..... > } > > Will this break any other behavior? -- I assumed not since the end() > method does return the contents of the buffer. > > Cheers, > Hans Lellelid > > Senior Web Programmer > Forum One Communications -- Sebastian Bergmann http://sebastian-bergmann.de/ http://phpOpenTracker.de/ Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/

« previous php.pear.dev (#11185) next »