更新内核,API接口开发的一些尝试,后期会增加API接口开发这块

This commit is contained in:
2017-05-22 20:48:10 +08:00
parent a4d58f9f09
commit 426195eb90
47 changed files with 1339 additions and 513 deletions

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->handler->get($key)) {
return $this->handler->increment($key, $step);
}
return $this->handler->set($key, $step);
}
/**

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->handler->get($key)) {
return $this->handler->increment($key, $step);
}
return $this->handler->set($key, $step);
}
/**