PHPackages                             targetliu/phpredis - 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. targetliu/phpredis

ActiveLibrary[Caching](/categories/caching)

targetliu/phpredis
==================

PhpRedis for Lumen 5.\*

1.2.1(9y ago)214.1k9[6 issues](https://github.com/TargetLiu/PHPRedis/issues)[2 PRs](https://github.com/TargetLiu/PHPRedis/pulls)PHP

Since Jul 19Pushed 9y ago2 watchersCompare

[ Source](https://github.com/TargetLiu/PHPRedis)[ Packagist](https://packagist.org/packages/targetliu/phpredis)[ RSS](/packages/targetliu-phpredis/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (1)Versions (8)Used By (0)

[PhpRedis](https://github.com/phpredis/phpredis) for Lumen 5.\*
===============================================================

[](#phpredis-for-lumen-5)

Update
------

[](#update)

### 1.2.1

[](#121)

1. Different database use different connections.(According to [issue #2](https://github.com/TargetLiu/PHPRedis/issues/2))

### 1.2.0

[](#120)

1. You can chose different Redis connections.(According to [issue #1](https://github.com/TargetLiu/PHPRedis/issues/1))

### 1.1.0

[](#110)

1. Move cache driver to `Target\PHPRedis\Cache` .
2. Add a Queue driver.

Installation
------------

[](#installation)

- Install [PhpRedis](https://pecl.php.net/package/redis)
- Run `composer require targetliu/phpredis`
- Configure redis in *.env*

### Basic

[](#basic)

- Add `$app->register(TargetLiu\PHPRedis\PHPRedisServiceProvider::class);` in *bootstrap/app.php*

### Cache Driver

[](#cache-driver)

- Add `$app->register(TargetLiu\PHPRedis\Cache\CacheServiceProvider::class);` in *bootstrap/app.php* in order to use PhpRedis with Lumen cache
- Add

```
'phpredis' => [
    'driver' => 'phpredis',
    'connection' => 'default',
],

```

to **stores** in *config/cache.php* or *vendor/larvel/lumen-framework/config/app.php* in order to use PhpRedis with Lumen cache

- Set `CACHE_DRIVER=phpredis` in *.env*

### Queue Driver

[](#queue-driver)

- Add `$app->register(TargetLiu\PHPRedis\Queue\QueueServiceProvider::class);` in *bootstrap/app.php* in order to use PhpRedis with Lumen queue
- Add

```
'phpredis' => [
    'driver'     => 'phpredis',
	'connection' => 'default',
	'queue'      => 'default',
	'expire'     => 60,
],

```

to **connections** in *config/queue.php* or *vendor/larvel/lumen-framework/config/queue.php* in order to use PhpRedis with Lumen queue

- Set `QUEUE_DRIVER=phpredis` in *.env*

Usage
-----

[](#usage)

- With `app('phpredis')` , read [PhpRedis document](https://github.com/phpredis/phpredis)
- With `app('cache')` , read [Lumen document](https://lumen.laravel.com/docs/5.2/cache)
- With `app('queue')` , read [Lumen document](https://lumen.laravel.com/docs/5.2/queues)

About the author
----------------

[](#about-the-author)

- Blog:

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance14

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity68

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 ~10 days

Total

7

Last Release

3569d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8343745?v=4)[Target Liu](/maintainers/TargetLiu)[@TargetLiu](https://github.com/TargetLiu)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/targetliu-phpredis/health.svg)

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

###  Alternatives

[beryllium/cachebundle

Provides an interface to Memcache for Symfony2 applications

32136.0k](/packages/beryllium-cachebundle)

PHPackages © 2026

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