<?
include 'fileCache.php';
$cache = fileCache::GetInstance(30,'cache/');//creating new instance singleton
$cache->setDebug(true);//this runs the debug and in destruct prints it
//normal usage
$cache->cache('test','test values for the var!!!!');
echo $cache->cache('test');//get
//overloads
$cache->anyvar='tes asd asd aasdasdasda sada ast';//overload of set and get methods
echo $cache->anyvar;//get overload
var_dump(isset($cache->anyvar));//isset and unset are overloaded
unset($cache->anyvar);
//clear
$cache->deleteCache();//deletes all the cache
$cache->deleteCache(60);//deletes any cache older than X seconds
?>
|