From 176771011ded88d9cacf4a06df0d3121635e16b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 4 Jan 2021 16:11:43 +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 | 5 +++-- System/Pool/Pool.php | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/System/Cache/Redis.php b/System/Cache/Redis.php index ef503b7a..667311c8 100644 --- a/System/Cache/Redis.php +++ b/System/Cache/Redis.php @@ -52,8 +52,9 @@ class Redis extends Component $config = $this->get_config(); $name = $config['host'] . ':' . $config['prefix'] . ':' . $config['databases']; - $connections->initConnections('redis:' . $name, true); - $connections->setLength(env('REDIS.POOL_LENGTH', 100)); + $length = env('REDIS.POOL_LENGTH', 100); + + $connections->initConnections('redis:' . $name, true, $length); } diff --git a/System/Pool/Pool.php b/System/Pool/Pool.php index 2f95881a..30be0dd4 100644 --- a/System/Pool/Pool.php +++ b/System/Pool/Pool.php @@ -11,8 +11,8 @@ use Snowflake\Snowflake; /** * Class Pool * @package Snowflake\Pool - * @property $redis - * @property $db + * @property Redis $redis + * @property Connection $db * @property $memcached */ class Pool extends \Snowflake\Abstracts\Pool