PHPackages                             easyswoole/redis-pool - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. easyswoole/redis-pool

ActiveLibrary[Framework](/categories/framework)

easyswoole/redis-pool
=====================

An efficient swoole framework

3.0.4(1y ago)480.0k↓44.4%520Apache-2.0PHPPHP &gt;=8.0

Since May 18Pushed 1y ago1 watchersCompare

[ Source](https://github.com/easy-swoole/redis-pool)[ Packagist](https://packagist.org/packages/easyswoole/redis-pool)[ Docs](https://www.easyswoole.com/)[ RSS](/packages/easyswoole-redis-pool/feed)WikiDiscussions 3.x Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (27)Used By (20)

Redis-Pool
==========

[](#redis-pool)

Redis-Pool 基于 [pool连接池管理](https://github.com/easy-swoole/pool),[redis协程客户端](https://github.com/easy-swoole/redis) 封装的组件

安装
--

[](#安装)

```
composer require easyswoole/redis-pool
```

连接池注册
-----

[](#连接池注册)

使用连接之前注册redis连接池:

```
//redis连接池注册(config默认为127.0.0.1,端口6379)
\EasySwoole\RedisPool\RedisPool::getInstance()->register(new \EasySwoole\Redis\Config\RedisConfig(),'redis');

//redis集群连接池注册
\EasySwoole\RedisPool\RedisPool::getInstance()->register(new \EasySwoole\Redis\Config\RedisClusterConfig([
        ['172.16.253.156', 9001],
        ['172.16.253.156', 9002],
        ['172.16.253.156', 9003],
        ['172.16.253.156', 9004],
    ]
),'redisCluster');
```

连接池配置
-----

[](#连接池配置)

当注册好时,将返回连接池的poolConfig用于配置连接池

使用连接池:
------

[](#使用连接池)

```
    $config = new Config(
        [
            'host'=>"",
            'port'=>"6300",
            'auth'=>"",
            "db"=>0
        ]
    );

    RedisPool::getInstance()->register($config);

    $client = RedisPool::defer();
    $ret = $client->get("a");
    var_dump($ret);
    $client->set("a",time());
    $ret = $client->get("a");
    var_dump($ret);

    RedisPool::invoke(function (Redis $redis){
        var_dump($redis->get("a"));
    });
```

！！！注意，在未指定连接池名称是，注册的连接池名称为默认的`default`

###  Health Score

45

—

FairBetter than 92% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community24

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 57.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~78 days

Recently: every ~142 days

Total

26

Last Release

593d ago

Major Versions

1.0.7 → 2.0.02019-09-06

2.x-dev → 3.0.12023-03-07

### Community

Maintainers

![](https://www.gravatar.com/avatar/45c234d5f129ea570e630425636299127647534f0c2cbb073555e2c45d403d6f?d=identicon)[kiss291323003](/maintainers/kiss291323003)

---

Top Contributors

[![kiss291323003](https://avatars.githubusercontent.com/u/24490609?v=4)](https://github.com/kiss291323003 "kiss291323003 (30 commits)")[![tioncico](https://avatars.githubusercontent.com/u/31308307?v=4)](https://github.com/tioncico "tioncico (18 commits)")[![evalor](https://avatars.githubusercontent.com/u/26944445?v=4)](https://github.com/evalor "evalor (4 commits)")

---

Tags

asyncframeworkswooleeasyswoole

### Embed Badge

![Health badge](/badges/easyswoole-redis-pool/health.svg)

```
[![Health](https://phpackages.com/badges/easyswoole-redis-pool/health.svg)](https://phpackages.com/packages/easyswoole-redis-pool)
```

###  Alternatives

[easyswoole/easyswoole

An efficient swoole framework

4.8k186.9k50](/packages/easyswoole-easyswoole)[easyswoole/rpc

An efficient swoole framework

7731.6k2](/packages/easyswoole-rpc)[easyswoole/orm

php stander lib

3088.7k17](/packages/easyswoole-orm)[easyswoole/kafka

An efficient swoole framework

4211.1k](/packages/easyswoole-kafka)[easyswoole/fast-cache

An efficient swoole framework

1030.3k2](/packages/easyswoole-fast-cache)[easyswoole/actor

easyswoole component

1410.3k](/packages/easyswoole-actor)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
