From 077df8f1b9761b511cc0e7e05b88d7e32ad44816 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Fri, 8 Jul 2016 17:00:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/cache/driver/Memcached.php | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/library/think/cache/driver/Memcached.php b/library/think/cache/driver/Memcached.php index 50082a1e..406f5855 100644 --- a/library/think/cache/driver/Memcached.php +++ b/library/think/cache/driver/Memcached.php @@ -17,13 +17,11 @@ class Memcached { protected $handler; protected $options = [ - 'host' => '127.0.0.1', - 'port' => 11211, - 'expire' => 0, - 'timeout' => 0, // 超时时间(单位:毫秒) - 'prefix' => '', - 'username' => '', //账号 - 'password' => '', //密码 + 'host' => '127.0.0.1', + 'port' => 11211, + 'expire' => 0, + 'timeout' => 0, // 超时时间(单位:毫秒) + 'prefix' => '', ]; /** @@ -56,10 +54,6 @@ class Memcached $servers[] = [$host, (isset($ports[$i]) ? $ports[$i] : $ports[0]), 1]; } $this->handler->addServers($servers); - if ('' != $this->options['username']) { - $this->handler->setOption(\Memcached::OPT_BINARY_PROTOCOL, true); - $this->handler->setSaslAuthData($this->options['username'], $this->options['password']); - } } /**