get($id, $group); if ($data !== false) { echo $data; return true; } else { // Nothing in cache... lets start the output buffer and start collecting data for next time. ob_start(); ob_implicit_flush( false ); // Set id and group placeholders $this->_id = $id; $this->_group = $group; return false; } } /** * Stop the cache buffer and store the cached data * * @access public * @return boolean True if cache stored * @since 1.5 */ function end() { // Get data from output buffer and echo it $data = ob_get_contents(); ob_end_clean(); echo $data; // Get id and group and reset them placeholders $id = $this->_id; $group = $this->_group; $this->_id = null; $this->_group = null; // Get the storage handler and store the cached data $this->store($data, $id, $group); } }