<?
include dirname(dirname(__FILE__)).'/Cacheme/Cacheme.php';
$cache = CacheMeLoader::Factory('memcache://127.0.0.1:11211');
$cache->lifetime = 10;
$cache->lifetime = 24*60*60;
$mycoolvariable = "mycoolvariable";
/* setting variable */
$cache->set($mycoolvariable, $mycoolvariable);
/* getting variable */
var_dump('1 - '.$cache->get($mycoolvariable));
/* flush */
$cache->clear();
var_dump('2 not exists'.$cache->get($mycoolvariable));
$cache->set($mycoolvariable, $mycoolvariable);
/* delete variable */
$cache->clear($mycoolvariable);
var_dump('3 not exists'.$cache->get($mycoolvariable));
?>
|