PHPackages                             tp5er/think-redis - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. tp5er/think-redis

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tp5er/think-redis
=================

An easy way to use the official PHP predis client in your thinkphp applications.

11.9kPHP

Since Jan 7Pushed 12mo agoCompare

[ Source](https://github.com/pkg6/think-redis)[ Packagist](https://packagist.org/packages/tp5er/think-redis)[ RSS](/packages/tp5er-think-redis/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

安装
--

[](#安装)

```
composer require tp5er/think-redis

```

基本配置
----

[](#基本配置)

```
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
REDIS_PASSWD=

```

常规使用
----

[](#常规使用)

> ```
> $redis = new \Predis\Client($parameters = null, $options = null);
> $redis->set('test','test');
>
> ```

您现在可以简单地替换最后两行：

```
$return = \tp5er\think\redis\Redis::set('test','test');

```

这将在默认连接上运行命令。 你可以运行一个命令 任何连接（参见 `defaultConnection` 设置和 `connections` 数组 配置文件）。

```
$return = \tp5er\think\redis\Redis::connection('connectionName')->set('test','test');

```

Copyright and License
---------------------

[](#copyright-and-license)

Copyright (c) 2021 wangzhiqiang

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity23

Early-stage or recently created project

 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://www.gravatar.com/avatar/28b119a234a9963e2266b2b493c037b1d7f01d3e17a06a3ffe94481549efa47b?d=identicon)[1751212020](/maintainers/1751212020)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/tp5er-think-redis/health.svg)

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

PHPackages © 2026

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