init(self::$conf);//连接 } else throw new exception($error); } catch (exception $e) { echo 'caught exception: ', $e->getmessage(), \n; exit; } return self::$obj; } } $_sc = array();
$_sc['cachetype'] = 'redis';//mymem $_sc['cacheconf'] = array(); $cache = cachefactory::createoperation(); $cache->setval('a',1); echo '
'; $a = $cache->getval('a'); echo '
'; $cache->delval('a'); ?>
复制代码