From d114f59194dfdcffab9126a133e3d6b1b81770ae Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sun, 24 Sep 2017 12:31:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B=E7=BC=93=E5=AD=98=E7=B1=BB?= =?UTF-8?q?=E7=9A=84remember=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/cache/Driver.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/think/cache/Driver.php b/library/think/cache/Driver.php index 2bdc0d80..89b25b77 100644 --- a/library/think/cache/Driver.php +++ b/library/think/cache/Driver.php @@ -122,6 +122,7 @@ abstract class Driver if (!$this->has($name)) { while ($this->has($name . '_lock')) { // 存在锁定则等待 + usleep(100000); } try { @@ -136,6 +137,8 @@ abstract class Driver } catch (\Exception $e) { // 解锁 $this->rm($name . '_lock'); + } catch (\throwable $e) { + $this->rm($name . '_lock'); } } else { $value = $this->get($name);