public function __construct($config) { if (empty($this->redis)) { $this->redis = Cache::getInstance('Redis'); if (!empty($config['new_cache_expire'])) { $this->gcTime = $config['new_cache_expire'] * 60; } $this->config = $config; } }
public function test() { $redis = Cache::getInstance("", "Redis"); $redis->set("a", 1); $redis2 = Cache::getInstance("", "Redis2"); $s = $redis->get("a"); var_dump($s); $redis2->set("a2", 2); $s = $redis2->get("a2"); // //var_dump($s); }
public function __construct($config) { if (empty($this->redis)) { $this->redis = Cache::getInstance('Redis'); } }