From 04ef4473cc0d6403798343884f1cc05904a60415 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 28 May 2021 18:23:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- System/Cache/Redis.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/System/Cache/Redis.php b/System/Cache/Redis.php index 92500c7c..32e2c993 100644 --- a/System/Cache/Redis.php +++ b/System/Cache/Redis.php @@ -92,7 +92,7 @@ if (_nx ~= 0) then end return 0 SCRIPT; - return $this->proxy()->eval($script, [$key, $timeout], 1); + return $this->proxy()->eval($script, ['{lock}:' . $key, $timeout], 1); } @@ -104,7 +104,7 @@ SCRIPT; public function unlock($key): int { $redis = $this->proxy(); - return $redis->del($key); + return $redis->del('{lock}:' . $key); }