From 1b8d64169f49d1625fcc8729d6bfee91bc650d04 Mon Sep 17 00:00:00 2001 From: Gaozhen Ying Date: Tue, 19 Sep 2017 21:00:43 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=83=A8=E5=88=86CacheDriver?= =?UTF-8?q?::dec=E5=9C=A8=E4=B8=BA=E7=A9=BA=E7=9A=84=E6=97=B6=E5=80=99?= =?UTF-8?q?=E9=80=92=E5=87=8F=E7=9A=84=E8=A1=8C=E4=B8=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/cache/driver/File.php | 2 +- library/think/cache/driver/Lite.php | 2 +- library/think/cache/driver/Sqlite.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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; }