This commit is contained in:
2021-01-04 16:11:43 +08:00
parent 308d06fd0d
commit 176771011d
2 changed files with 5 additions and 4 deletions
+3 -2
View File
@@ -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);
}
+2 -2
View File
@@ -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