PHPackages                             zkc/redis\_retry - 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. [API Development](/categories/api)
4. /
5. zkc/redis\_retry

ActiveLibrary[API Development](/categories/api)

zkc/redis\_retry
================

phpredis wrapper

v0.1.1(7y ago)012MITPHPPHP &gt;=5.3.0

Since May 15Pushed 7y ago1 watchersCompare

[ Source](https://github.com/zkc226/RedisRetry)[ Packagist](https://packagist.org/packages/zkc/redis_retry)[ RSS](/packages/zkc-redis-retry/feed)WikiDiscussions master Synced yesterday

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

RedisRetry
==========

[](#redisretry)

[![Latest Stable Version](https://camo.githubusercontent.com/f88712bcf9a03ff4d2375b86a1624aa5397183e026f3dfc5453afa3cbf11d517/68747470733a2f2f706f7365722e707567782e6f72672f6a656e6e65722f72656469735f72657472792f762f737461626c65)](https://packagist.org/packages/jenner/redis_retry)[![Total Downloads](https://camo.githubusercontent.com/f302c056a25cee392925310584824848cf5303a24484262fe10628b6a8214baa/68747470733a2f2f706f7365722e707567782e6f72672f6a656e6e65722f72656469735f72657472792f646f776e6c6f616473)](https://packagist.org/packages/jenner/redis_retry)[![Latest Unstable Version](https://camo.githubusercontent.com/dc4f14c2fa37415c7da1ca88d960dcbe10889ccb8b3a0bbead4cc0175bda07fe/68747470733a2f2f706f7365722e707567782e6f72672f6a656e6e65722f72656469735f72657472792f762f756e737461626c65)](https://packagist.org/packages/jenner/redis_retry)[![License](https://camo.githubusercontent.com/a3196b976ec31d7929c7e92e390c8e39c1c68b4d5fbd3ad65de5fbf5f55bacbf/68747470733a2f2f706f7365722e707567782e6f72672f6a656e6e65722f72656469735f72657472792f6c6963656e7365)](https://packagist.org/packages/jenner/redis_retry)

A Redis wrapper which can retry to connect when the connection is closed by some reason. It will not affect other code. What you need to do is just adding 'use \\Jenner\\RedisRetry\\Redis' in your code where you use the \\Redis class.

here is an example:

```
$redis = new Redis();
$redis->connect('127.0.0.1', 6379);
$redis->select(1);
$redis->set('key', 'value');
```

add 'use \\Jenner\\RedisRetry\\Redis' to the top of this php file:

```
use \Jenner\RedisRetry\Redis;

$redis = new Redis();
$redis->connect('127.0.0.1', 6379);
$redis->select(1);
$redis->set('key', 'value');
```

When we are running a php daemon process, it's possible that our program can not connect to the redis-server or the connection might be close for some reason that we don't know. The RedisRetry will reconnect to the redis-server when the connection is failed.

You can define two const to control the times to retry and the time to sleep(wait to retry the connection).

- REDIS\_RETRY\_TIMES - The times to retry the connection.
- REDIS\_RETRY\_DELAY - The time to sleep

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92% 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 ~610 days

Total

3

Last Release

2845d ago

### Community

Maintainers

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

---

Top Contributors

[![white-poto](https://avatars.githubusercontent.com/u/4362540?v=4)](https://github.com/white-poto "white-poto (23 commits)")[![zkc226](https://avatars.githubusercontent.com/u/14890199?v=4)](https://github.com/zkc226 "zkc226 (2 commits)")

---

Tags

apiwechat

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/zkc-redis-retry/health.svg)

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

###  Alternatives

[m165437/laravel-blueprint-docs

API Blueprint Renderer for Laravel

22779.5k](/packages/m165437-laravel-blueprint-docs)

PHPackages © 2026

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