diff --git a/library/think/cache/Driver.php b/library/think/cache/Driver.php index 89b25b77..0b8a3212 100644 --- a/library/think/cache/Driver.php +++ b/library/think/cache/Driver.php @@ -120,9 +120,10 @@ abstract class Driver public function remember($name, $value, $expire = null) { if (!$this->has($name)) { - while ($this->has($name . '_lock')) { + $time = time(); + while ($time + 5 > time() && $this->has($name . '_lock')) { // 存在锁定则等待 - usleep(100000); + usleep(200000); } try {