PHPackages                             earc/data-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. [Framework](/categories/framework)
4. /
5. earc/data-redis

ActiveLibrary[Framework](/categories/framework)

earc/data-redis
===============

eArc - the explicit architecture framework - data redis component

0.0(5y ago)0131MITPHPPHP ^8.0

Since Apr 7Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Koudela/eArc-data-redis)[ Packagist](https://packagist.org/packages/earc/data-redis)[ RSS](/packages/earc-data-redis/feed)WikiDiscussions master Synced 1w ago

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

eArc-data-redis
===============

[](#earc-data-redis)

Redis bridge providing entity-caching for the [earc/data](https://github.com/Koudela/eArc-data)abstraction.

installation
------------

[](#installation)

Install the earc/data-redis library via composer.

```
$ composer require earc/data-redis
```

basic usage
-----------

[](#basic-usage)

Initialize the earc/data abstraction in your index.php, bootstrap or configuration script.

```
use eArc\Data\Initializer;

Initializer::init();
```

Then register the earc/data-redis bridge to the earc/data `onLoad`, `onPersit`and `onRemove` events.

```
use eArc\Data\ParameterInterface;
use eArc\DataRedis\RedisDataBridge;

// The order of the on load tagging is important!
di_tag(ParameterInterface::TAG_ON_LOAD, RedisDataBridge::class);
di_tag(ParameterInterface::TAG_ON_LOAD, MyDatabaseBridge::class);

di_tag(ParameterInterface::TAG_ON_PERSIST, RedisDataBridge::class);
di_tag(ParameterInterface::TAG_ON_PERSIST, MyDatabaseBridge::class);

di_tag(ParameterInterface::TAG_ON_REMOVE, RedisDataBridge::class);
di_tag(ParameterInterface::TAG_ON_REMOVE, MyDatabaseBridge::class);
```

*Important*: For the `onLoad` event you have to tag the `RedisDataBridge` before your database bridge. Otherwise, the entities will never be loaded from cache.

Now earc/data uses your redis server to cache your entities.

### connection parameter for redis

[](#connection-parameter-for-redis)

By default, earc/data-redis uses `localhost` and the defaults of the php-redis-extension. You can overwrite these defaults:

```
use eArc\DataRedis\ParameterInterface;

di_set_param(ParameterInterface::REDIS_CONNECTION, ['127.0.0.1', 6379]);
```

This array is handed to the `Redis::connect()` method as arguments. Consult the [phpredis documentation](https://github.com/phpredis/phpredis/#connect-open) for valid values and configuration options.

advanced usage
--------------

[](#advanced-usage)

earc/data-redis uses [redis hashes](https://redis.io/commands#hash) to cache your entities. By default, the hash-keys are prefixed by `earc-data`. If you need another prefix to manage the redis namespace, you can overwrite the default:

```
use eArc\DataRedis\ParameterInterface;

di_set_param(ParameterInterface::HASH_KEY_PREFIX, 'some-hash-key-prefix');
```

releases
--------

[](#releases)

### release 0.0

[](#release-00)

- the first official release
- PHP ^8.0
- Redis &gt;=4.0.0

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity47

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

1867d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b7308f2797252cace014cfec12c1b5978c1bf5608be78d7a188ff690192959f3?d=identicon)[Thomas Koudela](/maintainers/Thomas%20Koudela)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/earc-data-redis/health.svg)

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

###  Alternatives

[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

712181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)[laravel/pail

Easily delve into your Laravel application's log files directly from the command line.

91545.3M590](/packages/laravel-pail)[nette/bootstrap

🅱 Nette Bootstrap: the simple way to configure and bootstrap your Nette application.

68535.8M592](/packages/nette-bootstrap)

PHPackages © 2026

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