Step 3 ...
Code:
<?
// CALL THE CACHING CLASS
require_once("cache.php");
// SET THE CACHING FOLDER PATH
$path = "./cache";
$self = $_SERVER['PHP_SELF'];
$query = !empty($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : null;
$file = md5('index');
// SET THE EXPIRATION TIME (IN SECONDS)
$expire = 3600;
$cache = new Cache($path);
// START WRITING TO CACHE
while($cache->save($file,$expire))
{
?>
You place this CODE in your index.php
variable is
$expire = 3600;
Higher number, good for high traffic volume
Lower Number, good for low traffic volume
NOW step 4
You place below code above the footer include.
Code:
<?
// FINISH WRITING TO CACHE
}
?>
This should do the trick
You can see the end result on
www.SmutThumb.com, as you can see there, the index refreshes every 60 minutes. So the load is way more friendly.
This code is costume. It is made to solve the problem you run into now.
Kind Regards
Harry