summaryrefslogtreecommitdiffstats
path: root/system/libraries/Cache/drivers
diff options
context:
space:
mode:
authortianhe1986 <w1s2j3229@163.com>2017-12-25 12:38:59 +0100
committertianhe1986 <w1s2j3229@163.com>2017-12-25 12:38:59 +0100
commite5af2c34a5af6a6e505034e9af6248131eaf7925 (patch)
tree5c9d3dc6a72287414811d7b41fbf13ddb3ce255a /system/libraries/Cache/drivers
parentfbae310a44e5d6fb3f962d148c80a60cd38c884a (diff)
Setting initial value with increment/decrement functions.
Signed-off-by: tianhe1986 <w1s2j3229@163.com>
Diffstat (limited to 'system/libraries/Cache/drivers')
-rw-r--r--system/libraries/Cache/drivers/Cache_memcached.php2
1 files changed, 2 insertions, 0 deletions
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);
}