From f5f39422e2661c6dce88b6c9597f921b782a992d Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 21 Mar 2017 14:29:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/cache/driver/Memcache.php | 2 +- library/think/cache/driver/Memcached.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/library/think/cache/driver/Memcache.php b/library/think/cache/driver/Memcache.php index b4295e56..e464f38c 100644 --- a/library/think/cache/driver/Memcache.php +++ b/library/think/cache/driver/Memcache.php @@ -113,7 +113,7 @@ class Memcache extends Driver public function inc($name, $step = 1) { $key = $this->getCacheKey($name); - if( $this->has($name) ){ + if ($this->handler->get($key)) { return $this->handler->increment($key, $step); } return $this->handler->set($key, $step); diff --git a/library/think/cache/driver/Memcached.php b/library/think/cache/driver/Memcached.php index 12610646..4a9d898c 100644 --- a/library/think/cache/driver/Memcached.php +++ b/library/think/cache/driver/Memcached.php @@ -125,7 +125,7 @@ class Memcached extends Driver public function inc($name, $step = 1) { $key = $this->getCacheKey($name); - if( $this->has($name) ){ + if ($this->handler->get($key)) { return $this->handler->increment($key, $step); } return $this->handler->set($key, $step);