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 sonracache_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.
Manuel Cahce :P Ayrıca Konunun başlıgını editlersen sevinirim Sql cache degil bu sql Cache aldıgı verileri sqla kayıt eder.sizin belirttiginiz dizine html leri kayıt etmez
