diff --git a/library/think/cache/driver/File.php b/library/think/cache/driver/File.php index f02f6e7a..95021e05 100644 --- a/library/think/cache/driver/File.php +++ b/library/think/cache/driver/File.php @@ -189,7 +189,7 @@ class File extends Driver if ($this->has($name)) { $value = $this->get($name) - $step; } else { - $value = $step; + $value = -$step; } return $this->set($name, $value, 0) ? $value : false; } diff --git a/library/think/cache/driver/Lite.php b/library/think/cache/driver/Lite.php index 2e541851..6ca8072e 100644 --- a/library/think/cache/driver/Lite.php +++ b/library/think/cache/driver/Lite.php @@ -149,7 +149,7 @@ class Lite extends Driver if ($this->has($name)) { $value = $this->get($name) - $step; } else { - $value = $step; + $value = -$step; } return $this->set($name, $value, 0) ? $value : false; } diff --git a/library/think/cache/driver/Sqlite.php b/library/think/cache/driver/Sqlite.php index dd7cc957..0860f4fd 100644 --- a/library/think/cache/driver/Sqlite.php +++ b/library/think/cache/driver/Sqlite.php @@ -159,7 +159,7 @@ class Sqlite extends Driver if ($this->has($name)) { $value = $this->get($name) - $step; } else { - $value = $step; + $value = -$step; } return $this->set($name, $value, 0) ? $value : false; }