修复inc方法

This commit is contained in:
水平凡
2017-03-21 14:06:59 +08:00
committed by GitHub
parent ba21d22213
commit b9c47a1332

View File

@@ -113,7 +113,10 @@ class Memcache 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);
}
/**