This commit is contained in:
2021-05-28 18:23:58 +08:00
parent 7bc6cb78b8
commit 04ef4473cc
+2 -2
View File
@@ -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);
}