mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-08 07:32:48 +08:00
修正redis缓存驱动类
This commit is contained in:
8
library/think/cache/driver/redis.php
vendored
8
library/think/cache/driver/redis.php
vendored
@@ -43,11 +43,11 @@ class Redis
|
|||||||
if (!empty($options)) {
|
if (!empty($options)) {
|
||||||
$this->options = array_merge($this->options, $options);
|
$this->options = array_merge($this->options, $options);
|
||||||
}
|
}
|
||||||
$func = $options['persistent'] ? 'pconnect' : 'connect';
|
$func = $this->options['persistent'] ? 'pconnect' : 'connect';
|
||||||
$this->handler = new \Redis;
|
$this->handler = new \Redis;
|
||||||
false === $options['timeout'] ?
|
false === $this->options['timeout'] ?
|
||||||
$this->handler->$func($options['host'], $options['port']) :
|
$this->handler->$func($this->options['host'], $this->options['port']) :
|
||||||
$this->handler->$func($options['host'], $options['port'], $options['timeout']);
|
$this->handler->$func($this->options['host'], $this->options['port'], $this->options['timeout']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user