PHPackages                             crazydb/yii2-redis-cluster - 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. [Database &amp; ORM](/categories/database)
4. /
5. crazydb/yii2-redis-cluster

ActiveLibrary[Database &amp; ORM](/categories/database)

crazydb/yii2-redis-cluster
==========================

yii2 with phpredis

1.2.1(3y ago)1650GPL-3.0-or-laterPHPPHP &gt;=5.6.0

Since Feb 2Pushed 3y ago1 watchersCompare

[ Source](https://github.com/xbzbing/Yii2-redis-cluster)[ Packagist](https://packagist.org/packages/crazydb/yii2-redis-cluster)[ RSS](/packages/crazydb-yii2-redis-cluster/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (3)Versions (9)Used By (0)

Yii2-redis-cluster
==================

[](#yii2-redis-cluster)

由于`yiisoft/Yii2-redis` 只支持单机`redis`，但近期的需求是在`cluster`模式下使用，所以简单包装一个轮子。

**扩展仅支持`cluster`集群模式**

依赖
--

[](#依赖)

- PHP &gt;= 5.6.0
- Redis &gt;= 3.0
- ext-redis &gt;= 3.0.0
- Yii2 ~2.0.4

安装
--

[](#安装)

```
composer require --prefer-dist crazydb/yii2-redis-cluster

```

配置
--

[](#配置)

```
return [
    //....
    'components' => [
        'redisCluster' => [
            'class' => 'crazydb\redis\Connection',
            'hosts' => [
                'localhost:6379'
            ]
        ],
        'cache' => [
            'class' => 'crazydb\redis\Cache',
            'redisCluster' => [
                'hosts' => [
                    'localhost:6379'
                ]
            ]
        ],
        'session' => [
            'class' => 'crazydb\redis\Session',
            'redisCluster' => [
                'hosts' => [
                    'localhost:6379'
                ]
            ]
        ]
    ]
];
```

注意事项
----

[](#注意事项)

1. 未完全测试，请勿直接用于生产环境。
2. 仅支持`cluster`集群模式。
3. 仅支持`cache`和`session`组件，不支持`ActiveRecord`。

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~235 days

Recently: every ~411 days

Total

8

Last Release

1374d ago

Major Versions

v0.8 → v1.02018-06-12

### Community

Maintainers

![](https://www.gravatar.com/avatar/d82a8318dbf53cc3fbf5ceb3711db0f03e6b1b923e9d1d092f7675f0817677ef?d=identicon)[疯狂的dabing](/maintainers/%E7%96%AF%E7%8B%82%E7%9A%84dabing)

---

Top Contributors

[![xbzbing](https://avatars.githubusercontent.com/u/1829426?v=4)](https://github.com/xbzbing "xbzbing (9 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/crazydb-yii2-redis-cluster/health.svg)

```
[![Health](https://phpackages.com/badges/crazydb-yii2-redis-cluster/health.svg)](https://phpackages.com/packages/crazydb-yii2-redis-cluster)
```

###  Alternatives

[yii2tech/illuminate

Yii2 to Laravel Migration Package

11315.1k](/packages/yii2tech-illuminate)[mootensai/yii2-relation-trait

Yii 2 Models load with relation, &amp; transaction save with relation

47220.3k9](/packages/mootensai-yii2-relation-trait)[nhkey/yii2-activerecord-history

Storage history of changes to ActiveRecord

46143.4k1](/packages/nhkey-yii2-activerecord-history)[dmstr/yii2-db

Database extensions

19618.8k6](/packages/dmstr-yii2-db)[urbanindo/yii2-dynamodb

DynamoDB extensions for Yii2

1471.4k](/packages/urbanindo-yii2-dynamodb)[spanjeta/yii2-backup

Database Backup and Restore functionality

285.0k1](/packages/spanjeta-yii2-backup)

PHPackages © 2026

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