It ain’t simple, but it does work.
1) Get Lite.php from http://pear.php.net/package/Cache_Lite
2) Edit Lite.php and replace all instances of $id with $cid.
3) Upload Lite.php to your server directory and make sure it remains as Lite.php.
4) Create a directory named cache and CHMOD it to 777.
5) Edit your more.php file to add these lines at the beginning:
<?php
include("pm_inc.php");
require_once("Lite.php");
// set an ID for this cache
$cid = get_id($id, "1");
// set some variables
$options = array(
// cacheDir should be the absolute address of your files on your server**
// this will vary wildly depending on the server configuration
'cacheDir' => '/home/myaccount/mydomain/cache/',
'lifeTime' => 50
);
// create a Cache_Lite object
$objCache = new Cache_Lite($options);
// test if there exists a valid cache
if ($quote = $objCache->get($cid))
{ echo $quote; }
else
{
echo $quote;
$objCache->save($quote, $cid);
}
?>
**If you don’t know this, just comment out the last } in the code upload the file and run it one time, the error message will let you know :=) Copy the path and insert it into your more.php file, don’t forget to fix the broken line.
Your server needs the Pear module installed (it probably will be).
This probably won’t work if you are on a WinDoes server.
If you have multiple weblogs on your site, some tuning will be required :=)
