From 503e8d98f6700b94eaa567568209b1553d595c6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Thu, 1 Apr 2021 18:35:16 +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 | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/System/Cache/Redis.php b/System/Cache/Redis.php index 16490970..fe13b305 100644 --- a/System/Cache/Redis.php +++ b/System/Cache/Redis.php @@ -48,10 +48,8 @@ class Redis extends Component /** - * @throws ComponentException * @throws ConfigException - * @throws ReflectionException - * @throws NotFindClassException + * @throws Exception */ public function createPool() { @@ -86,10 +84,10 @@ class Redis extends Component /** * @param $key * @param int $timeout - * @return bool + * @return bool|int * @throws Exception */ - public function lock($key, $timeout = 5): bool + public function lock($key, $timeout = 5): bool|int { $script = <<