修复inc方法

This commit is contained in:
水平凡
2017-03-21 14:08:32 +08:00
committed by GitHub
parent b9c47a1332
commit 2971e93fd5

View File

@@ -125,7 +125,10 @@ class Memcached extends Driver
public function inc($name, $step = 1)
{
$key = $this->getCacheKey($name);
return $this->handler->increment($key, $step);
if( $this->has($name) ){
return $this->handler->increment($key, $step);
}
return $this->handler->set($key, $step);
}
/**