PHPackages                             redisent/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. [Caching](/categories/caching)
4. /
5. redisent/redis

ActiveLibrary[Caching](/categories/caching)

redisent/redis
==============

A simple, no-nonsense interface to the Redis for modest developers. It is designed to be flexible and tolerant of changes to the Redis protocol

1.10(12y ago)126.8k↓43.9%2ISCPHPPHP &gt;=5.3.0

Since Dec 31Pushed 12y ago1 watchersCompare

[ Source](https://github.com/mardix/redisent)[ Packagist](https://packagist.org/packages/redisent/redis)[ Docs](https://github.com/mardix/redisent)[ RSS](/packages/redisent-redis/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Redisent
========

[](#redisent)

Redisent is a simple, no-nonsense interface to the [Redis](http://redis.io) data structure store for modest developers. It is designed to flexible and tolerant of changes to the Redis protocol.

Introduction
------------

[](#introduction)

If you're at all familiar with the Redis protocol and PHP objects, you've already mastered Redisent. Redisent translates method calls to their [Redis protocol](http://redis.io/topics/protocol) equivalent, abstracting away the nitty-gritty, and then makes the return values PHP compatible.

Features
--------

[](#features)

### Shared Redis API

[](#shared-redis-api)

The Redisent method names map directly to their Redis command counterparts. The full list is available in the [command reference](http://redis.io/commands).

#### Setting Keys

[](#setting-keys)

```
$redis->set('foo', 'bar')
// SET foo bar
```

#### Working with lists

[](#working-with-lists)

```
$redis->lpush('particles', 'electron')
// LPUSH particles electron
$redis->lpush('particles', 'proton')
// LPUSH particles proton
$redis->lpush('particles', 'neutron')
// LPUSH particles neutron
$redis->llen('particles')
// LLEN particles
```

### Pipelining

[](#pipelining)

Redisent provides a fluent interface for [pipelining](http://redis.io/topics/pipelining) commands to Redis.

```
$redis->pipeline()
  ->set('X', 2)
  ->incr('X')
  ->incr('X')
  ->uncork(); // #=> array containing the responses of each command
```

Quick Start
-----------

[](#quick-start)

Redisent has no dependencies aside from requiring PHP versions 5.3 and later. To add it to your project, simply drop the Redis.php file into your project structure, instantiate a Redis instance, and start issuing commands.

```
require_once 'redisent/Redis.php';
$redis = new redisent\Redis('redis://localhost');
$redis->set('awesome', 'absolutely');
echo "Is Redisent awesome? ", $redis->get('awesome'), "\n";
```

Any errors originating from Redis will be wrapped in a `resident\RedisException` and thrown.

Pipelining
----------

[](#pipelining-1)

Redisent supports a fluent interface for [pipelining](http://redis.io/topics/pipelining). A pipeline is started by calling the `pipeline` method on a `Redis` instance, using Redisent as usual, and then calling the `uncork` method. The `uncork` method returns an array of the responses of the pipelined commands.

### Example

[](#example)

```
$redis = new Redisent\Redis();
$responses = $redis->pipeline()
    ->incr('X')
    ->incr('X')
    ->incr('X')
    ->incr('X')
    ->uncork();
print_r($responses);
```

If the key X didn't exist, the first INCR would create it and return 1, and successive calls would increment it by 1. The return value of the call to `uncork()` would be `array(1,2,3,4)`, the responses of each INCR command.

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

[](#contributing)

Pull requests please! Feature/topic branches are especially appreciated. Unit tests are written with [SimpleTest](http://simpletest.org/), please include tests in your pull request. To run tests, run `sh setup.sh` script to get set up and then `php tests/all_tests.php` to run the suite.

Roadmap
-------

[](#roadmap)

Redis has grown to be very feature rich, and Redisent is lagging behind.

- Publish/subscribe
- Transactions

About
-----

[](#about)

Copyright © 2009-2012 [Justin Poliey](http://justinpoliey.com)

License
-------

[](#license)

Licensed under the [ISC License](http://www.opensource.org/licenses/ISC).

Copyright (c) 2009-2012 Justin Poliey

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 76.2% 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

4521d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/245d2ddb4a8707baf62f8384d72fd7f6d0629ad8f67e6fe83c0888c2d8e80de1?d=identicon)[Mardix](/maintainers/Mardix)

---

Top Contributors

[![jdp](https://avatars.githubusercontent.com/u/574?v=4)](https://github.com/jdp "jdp (48 commits)")[![mardix](https://avatars.githubusercontent.com/u/111839?v=4)](https://github.com/mardix "mardix (9 commits)")[![oker1](https://avatars.githubusercontent.com/u/431237?v=4)](https://github.com/oker1 "oker1 (2 commits)")[![spk](https://avatars.githubusercontent.com/u/98590?v=4)](https://github.com/spk "spk (1 commits)")[![kevburnsjr](https://avatars.githubusercontent.com/u/20638?v=4)](https://github.com/kevburnsjr "kevburnsjr (1 commits)")[![jmhobbs](https://avatars.githubusercontent.com/u/115059?v=4)](https://github.com/jmhobbs "jmhobbs (1 commits)")[![intarstudents](https://avatars.githubusercontent.com/u/227198?v=4)](https://github.com/intarstudents "intarstudents (1 commits)")

---

Tags

redisnosqlredisentkey value store

### Embed Badge

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

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

###  Alternatives

[predis/predis

A flexible and feature-complete Redis/Valkey client for PHP.

7.8k305.7M2.4k](/packages/predis-predis)[snc/redis-bundle

A Redis bundle for Symfony

1.0k39.4M67](/packages/snc-redis-bundle)[predis/predis-async

Asynchronous version of Predis

366348.4k](/packages/predis-predis-async)[jamescauwelier/psredis

Sentinel client for the popular php redis client

77392.9k5](/packages/jamescauwelier-psredis)[symfony-bundles/redis-bundle

Symfony Redis Bundle

271.1M5](/packages/symfony-bundles-redis-bundle)[maykonn/codeigniter-predis

The CodeIgniter Redis package

129.3k](/packages/maykonn-codeigniter-predis)

PHPackages © 2026

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