From d77ceeaf3d7c506a050163af40f4a6bb1e1f2a38 Mon Sep 17 00:00:00 2001 From: tianhe1986 Date: Fri, 5 Jan 2018 22:50:05 +0800 Subject: Do not retry after calling add() Signed-off-by: tianhe1986 --- system/libraries/Cache/drivers/Cache_memcached.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/libraries') diff --git a/system/libraries/Cache/drivers/Cache_memcached.php b/system/libraries/Cache/drivers/Cache_memcached.php index 8b6af84db..1562569e8 100644 --- a/system/libraries/Cache/drivers/Cache_memcached.php +++ b/system/libraries/Cache/drivers/Cache_memcached.php @@ -212,7 +212,7 @@ class CI_Cache_memcached extends CI_Driver { { if (($result = $this->_memcached->increment($id, $offset)) === FALSE) { - return $this->_memcached->add($id, $offset) ? $offset : $this->_memcached->increment($id, $offset); + return $this->_memcached->add($id, $offset) ? $offset : FALSE; } return $result; @@ -231,7 +231,7 @@ class CI_Cache_memcached extends CI_Driver { { if (($result = $this->_memcached->decrement($id, $offset)) === FALSE) { - return $this->_memcached->add($id, 0) ? 0 : $this->_memcached->decrement($id, $offset); + return $this->_memcached->add($id, 0) ? 0 : FALSE; } return $result; -- cgit v1.2.3-24-g4f1b