mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
改进
This commit is contained in:
2
library/think/cache/driver/Memcache.php
vendored
2
library/think/cache/driver/Memcache.php
vendored
@@ -113,7 +113,7 @@ class Memcache extends Driver
|
||||
public function inc($name, $step = 1)
|
||||
{
|
||||
$key = $this->getCacheKey($name);
|
||||
if( $this->has($name) ){
|
||||
if ($this->handler->get($key)) {
|
||||
return $this->handler->increment($key, $step);
|
||||
}
|
||||
return $this->handler->set($key, $step);
|
||||
|
||||
2
library/think/cache/driver/Memcached.php
vendored
2
library/think/cache/driver/Memcached.php
vendored
@@ -125,7 +125,7 @@ class Memcached extends Driver
|
||||
public function inc($name, $step = 1)
|
||||
{
|
||||
$key = $this->getCacheKey($name);
|
||||
if( $this->has($name) ){
|
||||
if ($this->handler->get($key)) {
|
||||
return $this->handler->increment($key, $step);
|
||||
}
|
||||
return $this->handler->set($key, $step);
|
||||
|
||||
Reference in New Issue
Block a user