iki adet dosya oluşturuyoruz : cache_header.php ve cache_footer.php

cache_header.php nin içine :
<?
$filename = "%%-".md5($_SERVER['REQUEST_URI'])."-%%.html"; 
$cachefile = "/home/xxx.com/http/cache/".$filename; // ana dizine bir cache kalörü açıp adresi yazıyoruz buraya
$cachetime = 30 * 60; // cacje süresi
if (file_exists($cachefile) && time() - $cachetime < filemtime($cachefile)) 
{ 
include($cachefile); 
exit; 
} 
ob_start(); 
?>
yazıyoruz sonra

cache_footer.php nin içine (güncellenen sayfalar için)

<?
$fp = fopen($cachefile, 'w+'); 
fwrite($fp, ob_get_contents()); 
fclose($fp); 
ob_end_flush(); 
?>
yazıyoruz.
cache_header.php yi cahe liceğimiz sayfanın en üstüne ( config altına)
cache_footer.php yi en altına ekliyoruz bu kadar.
özellikle video siteleri için çok ideal bir sistem. denedi çalışıyor.