PHPackages                             llegaz/redis-adapter - 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. llegaz/redis-adapter

ActiveLibrary[Caching](/categories/caching)

llegaz/redis-adapter
====================

additional layer based on phpredis/phpredis and predis/predis

0.1.2(4mo ago)1177[1 PRs](https://github.com/llegaz/RedisAdapter/pulls)MITPHPPHP ^8.1

Since Jan 16Pushed 3mo ago1 watchersCompare

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

READMEChangelog (10)Dependencies (5)Versions (15)Used By (0)

Redis Adapter
=============

[](#redis-adapter)

Intro
-----

[](#intro)

This project isn't really an adapter, for me, it is a sort of **GATEWAY**. (see [Martin Fowler, Gateway Pattern](https://martinfowler.com/articles/gateway-pattern.html)).

The goal here is to adapt use of either [Predis](https://github.com/predis/predis) client or native [PHP Redis](https://github.com/phpredis/phpredis/) client in a transparently way. Those are the real adaptees, their respective classes are extended to adapt them to the gateway (`RedisAdapter`) that will encapsulate one of them (as a redis client) and use one or the other indifferently depending on environment.

It will use preferably [PHP Redis](https://github.com/phpredis/phpredis/) if available (extension installed), or else fallback on [predis](https://github.com/predis/predis).

This class settles base for other projects based on it (PSR-6 and PSR-16 Cache systems and so on)

[![Redis Adapter project class diagram](./devtools/classes_diagram.png)](./devtools/classes_diagram.png)

Install
-------

[](#install)

```
composer require llegaz/redis-adapter
composer install
```

### env

[](#env)

In order to work we need php8 and some classical php extensions plus a **local redis server** (for testing purpose) and **docker to test multiples instances of redis servers**.

```
apt install php8.1 php8.1-cli php8.1-common php8.1-mbstring php8.1-opcache
```

and perhaps other packages may be required for composer to work smoothly

```
apt install php8.1-xml php8.1-http php8.1-dom
```

Dev
---

[](#dev)

install redis servers with docker (you will need a valid docker and docker-compose on your system)

```
docker pull redis
docker-compose -f docker-compose.yml up -d
```

Contributing
------------

[](#contributing)

You're welcome to propose things. I am open to criticism as long as it remains benevolent.

Stay tuned, by following me on github, for new features using [predis](https://github.com/predis/predis) and [PHP Redis](https://github.com/phpredis/phpredis/).

---

@see you space cowboy
---------------------

[](#see-you-space-cowboy)

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance79

Regular maintenance activity

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

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

Every ~31 days

Recently: every ~14 days

Total

12

Last Release

143d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b5c6fbcd88b3869f85973ecbd65773891a8b231f43c01f0e7bb85aab55d06d6e?d=identicon)[llegaz](/maintainers/llegaz)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/llegaz-redis-adapter/health.svg)

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

###  Alternatives

[symfony/cache

Provides extended PSR-6, PSR-16 (and tags) implementations

4.2k348.9M2.5k](/packages/symfony-cache)[amphp/redis

Efficient asynchronous communication with Redis servers, enabling scalable and responsive data storage and retrieval.

165634.7k44](/packages/amphp-redis)[ethanhann/redisearch-php

239113.6k1](/packages/ethanhann-redisearch-php)[pdffiller/qless-php

PHP Bindings for qless

29113.2k1](/packages/pdffiller-qless-php)[neos/cache

Neos Cache Framework

102.0M31](/packages/neos-cache)[eliashaeussler/typo3-warming

Warming - Warms up Frontend caches based on an XML sitemap. Cache warmup can be triggered via TYPO3 backend or using a console command. Supports multiple languages and custom crawler implementations.

20229.9k](/packages/eliashaeussler-typo3-warming)

PHPackages © 2026

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