PHPackages                             lingyin/predis - 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. [Caching](/categories/caching)
4. /
5. lingyin/predis

ActiveLibrary[Caching](/categories/caching)

lingyin/predis
==============

yii2整合predis，支持哨兵、集群

v0.0.1(8y ago)021PHP

Since Apr 22Pushed 7y ago1 watchersCompare

[ Source](https://github.com/LingyinTech/yii2-predis)[ Packagist](https://packagist.org/packages/lingyin/predis)[ RSS](/packages/lingyin-predis/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

yii2-predis
===========

[](#yii2-predis)

在yii2 框架中使用 predis , 支持cluster,sentinel

安装
--

[](#安装)

```
composer require lingyin/predis

```

配置
--

[](#配置)

```
return [
    'components' =>
        'cache' => [
            'class' => \lingyin\predis\Cache::class,
            'keyPrefix' => 'lingyin-common:',
            'redis' => [
                'parameters' => [
                    [
                        'host' => '127.0.0.1',
                        'port' => 6380,
                    ],
                    [
                        'host' => '127.0.0.1',
                        'port' => 6381,
                    ],
                ],
                'options' => [
                    'replication' => 'sentinel',
                    'service' => 'sentinel-127.0.0.1-6380',
                    'parameters' => [
                        'password' => 'profileLogStash',
                        'database' => 4,
                    ]
                ],
            ]
        ]
    ]

```

使用
--

[](#使用)

```
// set
$result = Yii::$app->cache->set('test','test',600);

// get
$value = Yii::$app->cache->get('test');

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2944d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/901366a9dd8b8c4dbc9541cba4154174e50c98fea38964e96443980d5465b75c?d=identicon)[actors315](/maintainers/actors315)

---

Top Contributors

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

---

Tags

predisyii2-extension

### Embed Badge

![Health badge](/badges/lingyin-predis/health.svg)

```
[![Health](https://phpackages.com/badges/lingyin-predis/health.svg)](https://phpackages.com/packages/lingyin-predis)
```

###  Alternatives

[pdffiller/qless-php

PHP Bindings for qless

29113.2k1](/packages/pdffiller-qless-php)[mojifan/yii2-predis

Redis Cache, Session for the Yii2

2257.2k](/packages/mojifan-yii2-predis)

PHPackages © 2026

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