PHPackages                             naixiaoxin/think-redissentinel - 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. naixiaoxin/think-redissentinel

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

naixiaoxin/think-redissentinel
==============================

redis sentinel driver for thinkphp5

215PHP

Since Sep 15Pushed 9y ago2 watchersCompare

[ Source](https://github.com/qiqizjl/think-redissentinel)[ Packagist](https://packagist.org/packages/naixiaoxin/think-redissentinel)[ RSS](/packages/naixiaoxin-think-redissentinel/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

ThinkPHP 5.0 Redis Sentinel驱动
=============================

[](#thinkphp-50-redis-sentinel驱动)

首先安装官方的php-redis扩展：

然后，配置应用的配置文件`config.php`的`cache['type']`参数为：

```
'type'  =>  '\think\sentinel\Sentinel',

```

并增加一下参数 cache\['server'\]:(是个数组,host是地址,port是端口号):

```
'servers'=>[
    0=>[
        'host'=>'127.0.0.1',
         'port'=>'26379'
    ],
    1=>[
        'host'=>'127.0.0.1',
        'port'=>'26380'
    ]
],

```

cache\['name'\]:是哨兵的名字

```
'name'  =>  'mymaster',

```

即可正常使用Sentinel，例如：

```
Cache::get('test');
Cache::get('test','test');

```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7540584?v=4)[NaiXiaoXin](/maintainers/qiqizjl)[@qiqizjl](https://github.com/qiqizjl)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/naixiaoxin-think-redissentinel/health.svg)

```
[![Health](https://phpackages.com/badges/naixiaoxin-think-redissentinel/health.svg)](https://phpackages.com/packages/naixiaoxin-think-redissentinel)
```

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k116.5M113](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[pgvector/pgvector

pgvector support for PHP

198628.3k10](/packages/pgvector-pgvector)

PHPackages © 2026

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