basit bir örnek:

<?
$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();
?>

Gelişmiş birşey istiyorsan PEAR 'ın cache kütüphanesinin sistemine göz atabilirsin.