From 2fcd752d33a904d7aa46cb218be496ae0a778e5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=98=E7=BC=98?= Date: Sun, 8 May 2016 23:43:47 +0800 Subject: [PATCH] =?UTF-8?q?redisd=20handler=E6=96=B9=E6=B3=95=E5=85=81?= =?UTF-8?q?=E8=AE=B8=E6=8C=87=E5=AE=9A=E4=B8=BB=E4=BB=8E=E8=8A=82=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/cache/driver/Redisd.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/library/think/cache/driver/Redisd.php b/library/think/cache/driver/Redisd.php index 5e08dcd2..a951888b 100644 --- a/library/think/cache/driver/Redisd.php +++ b/library/think/cache/driver/Redisd.php @@ -196,6 +196,7 @@ class Redisd * * @access public * @param string $name 缓存key + * @param bool $master 指定主从节点,可以从主节点获取结果 * @return mixed */ public function get($name, $master = false) @@ -301,10 +302,12 @@ class Redisd * 需要先执行 $redis->master() 连接到 DB * * @access public + * @param bool $master 指定主从节点,可以从主节点获取结果 * @return object */ - public function handler() + public function handler($master = true) { + $this->master($master); return $this->handler; }