Beispiel #1
0
 public function __construct($config)
 {
     if (empty($this->redis)) {
         $this->redis = Manager\Redis::getInstance($config);
         $this->gcTime = \session_cache_expire();
         $this->gcTime *= 60;
     }
 }
Beispiel #2
0
 public function __construct($config)
 {
     if (empty($this->redis)) {
         $this->redis = ZRedis::getInstance($config);
         $db = ZConfig::getField('connection', 'db', 0);
         if (!empty($db)) {
             $this->redis->select($db);
         }
     }
 }
Beispiel #3
0
 public function __construct($config)
 {
     if (empty($this->redis)) {
         $this->redis = Manager\Redis::getInstance($config);
         if (!empty($config['cache_expire'])) {
             $this->gcTime = $config['cache_expire'] * 60;
         }
         $this->config = $config;
     }
 }
Beispiel #4
0
 public function __construct($config)
 {
     if (empty($this->redis)) {
         $this->redis = Manager\Redis::getInstance($config);
     }
 }
Beispiel #5
0
 public function setSlave($config)
 {
     if (empty($this->sRedis)) {
         $this->sRedis = Manager\Redis::getInstance($config);
     }
 }