function use_cache ( $key = '' )
		{
			if (empty($_POST))
			{
				$this->cache_filename  =  $this->cache_dir . 'cache_' . md5($_SERVER['REQUEST_URI'] . serialize($key)) . '.ser';
				if (($_SERVER['HTTP_CACHE_CONTROL'] != 'no-cache')  &&  ($_SERVER['HTTP_PRAGMA'] != 'no-cache')  &&  @is_file($this->cache_filename))
				{
					if ((time() - filemtime($this->cache_filename)) < $this->cache_lifetime)
					{
						readfile($this->cache_filename);
						exit;
					}
				}
				ob_start( array( &$this, 'cache_callback' ) );
			}
		}
function use_cache ( $key = '' )
		{
			if (empty($_POST))
			{
				$this->cache_filename  =  $this->cache_dir . 'cache_' . md5($_SERVER['REQUEST_URI'] . serialize($key)) . '.ser';
				if (($_SERVER['HTTP_CACHE_CONTROL'] != 'no-cache')  &&  ($_SERVER['HTTP_PRAGMA'] != 'no-cache')  &&  @is_file($this->cache_filename))
				{
					if ((time() - filemtime($this->cache_filename)) < $this->cache_lifetime)
					{
						readfile($this->cache_filename);
						exit;
					}
				}
				ob_start( array( &$this, 'cache_callback' ) );
			}
		}
function use_cache ( $ key = '' ) { if ( empty ( $ _POST ) ) { $ this -> cache_filename = $ this -> cache_dir . 'cache_' . md5 ( $ _SERVER [ 'REQUEST_URI' ] . serialize ( $ key ) ) . '.ser' ; if ( ( $ _SERVER [ 'HTTP_CACHE_CONTROL' ] != 'no-cache' ) && ( $ _SERVER [ 'HTTP_PRAGMA' ] != 'no-cache' ) && @ is_file ( $ this -> cache_filename ) ) { if ( ( time ( ) - filemtime ( $ this -> cache_filename ) ) < $ this -> cache_lifetime ) { readfile ( $ this -> cache_filename ) ; exit ; } } ob_start ( array ( & $ this , 'cache_callback' ) ) ; } }
Start Ouput Content Buffering

Usage Example:
$page = new SmartTemplate('template.html');
$page->use_cache();
...

@access public
@desc Output Cache
Start Ouput Content Buffering