en iyisi ve basiti budur

çok profesyonel değildir ama cache mantığı file cache ile başlar
bu haliyle bile %500 randıman aldım ben

header.php en üst
<?php
$filename = "%%-".md5($_SERVER['REQUEST_URI'])."-%%.html";
$cachefile = "cache/".$filename;
$cachetime = 3 * 60 * 60; // Cache Süresi
if (file_exists($cachefile))
{
if(time() - $cachetime < filemtime($cachefile))
{
readfile($cachefile);
exit;
}
else
{
unlink($cachefile);
}
}
ob_start();
?>
footer.php
en alt

<?php  $fp = fopen($cachefile, 'w+');   fwrite($fp, ob_get_contents());   fclose($fp);   ob_end_flush();   ?>
eklentiler ile kasmaya gerek yok