|
@@ -33,8 +33,12 @@ class CacheRedis extends Cache
|
|
|
Log::record("CacheRedis init_slave disconnect.",Log::DEBUG);
|
|
|
}
|
|
|
}
|
|
|
+ if (is_mobile()) {
|
|
|
+ $func = 'connect';
|
|
|
+ } else {
|
|
|
+ $func = $this->config['pconnect'] ? 'pconnect' : 'connect';
|
|
|
+ }
|
|
|
|
|
|
- $func = $this->config['pconnect'] ? 'pconnect' : 'connect';
|
|
|
$this->handler = new Redis();
|
|
|
$this->enable = $this->handler->$func($this->config['master']['host'], $this->config['master']['port']);
|
|
|
$_cache = $this->handler;
|
|
@@ -54,7 +58,12 @@ class CacheRedis extends Cache
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- $func = $this->config['pconnect'] ? 'pconnect' : 'connect';
|
|
|
+ if (is_mobile()) {
|
|
|
+ $func = 'connect';
|
|
|
+ } else {
|
|
|
+ $func = $this->config['pconnect'] ? 'pconnect' : 'connect';
|
|
|
+ }
|
|
|
+
|
|
|
$this->handler = new Redis();
|
|
|
$this->enable = $this->handler->$func($this->config['slave']['host'], $this->config['slave']['port']);
|
|
|
$_cache = $this->handler;
|