您好,欢迎访问一九零五行业门户网

php写的一个缓存接口demo,兼容redis和memcache

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'); ?>
复制代码
其它类似信息

推荐信息