Bir cache dosyam mevcut.Normalde hangi sayfaya girilirse o sayfayı cacheliyor fakat ben istiyorum ki bütün etiket ana sayfa vesaire herşeyi bir kerede cacheletmek.Kod aşağıda. Ücretli destek bekliyorum.
<?php
$ftp_cache = 15; // dakika cinsinden
function cache_baslat(){
global $ftp_cache;
$filename = md5($_SERVER['REQUEST_URI']).'.html';
$cachefile = 'x/'.$filename;
define('_CACHEDOSYASI', $cachefile);
$zaman = 60 * $ftp_cache;
$cachetime = $zaman;
if (file_exists($cachefile)){
if(time() - $cachetime < filemtime($cachefile)){
readfile($cachefile);
exit;
}else{
unlink($cachefile);
}
}
ob_start();
}
function cache_bitir(){
$fp = fopen(_CACHEDOSYASI, 'w+');
fwrite($fp, ob_get_contents());
fclose($fp);
ob_end_flush();
}
?>