From e5af2c34a5af6a6e505034e9af6248131eaf7925 Mon Sep 17 00:00:00 2001 From: tianhe1986 Date: Mon, 25 Dec 2017 19:38:59 +0800 Subject: Setting initial value with increment/decrement functions. Signed-off-by: tianhe1986 --- system/libraries/Cache/drivers/Cache_memcached.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'system/libraries/Cache/drivers/Cache_memcached.php') diff --git a/system/libraries/Cache/drivers/Cache_memcached.php b/system/libraries/Cache/drivers/Cache_memcached.php index 4836b6aed..314263d7e 100644 --- a/system/libraries/Cache/drivers/Cache_memcached.php +++ b/system/libraries/Cache/drivers/Cache_memcached.php @@ -210,6 +210,7 @@ class CI_Cache_memcached extends CI_Driver { */ public function increment($id, $offset = 1) { + $this->_memcached->add($id, 0); return $this->_memcached->increment($id, $offset); } @@ -224,6 +225,7 @@ class CI_Cache_memcached extends CI_Driver { */ public function decrement($id, $offset = 1) { + $this->_memcached->add($id, 0); return $this->_memcached->decrement($id, $offset); } -- cgit v1.2.3-24-g4f1b