PHPackages                             andrewdyer/predis-adaptor - 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. andrewdyer/predis-adaptor

ActiveLibrary[Caching](/categories/caching)

andrewdyer/predis-adaptor
=========================

A simple framework-agnostic caching solution using Redis

1.3.0(1y ago)0150MITPHPPHP &gt;=8.2

Since Aug 15Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/andrewdyer/predis-adaptor)[ Packagist](https://packagist.org/packages/andrewdyer/predis-adaptor)[ Docs](https://github.com/andrewdyer/predis-adaptor)[ RSS](/packages/andrewdyer-predis-adaptor/feed)WikiDiscussions main Synced 2mo ago

READMEChangelog (5)Dependencies (2)Versions (6)Used By (0)

[![Predis Adaptor](https://camo.githubusercontent.com/89503da70ab00a1745f2c56a1809968145b43f1bdd5f20759d950e6485cbdfaf/68747470733a2f2f7075626c69632d6173736574732e616e64726577647965722e726f636b732f696d616765732f636f766572732f7072656469732d61646170746f722e706e67)](https://camo.githubusercontent.com/89503da70ab00a1745f2c56a1809968145b43f1bdd5f20759d950e6485cbdfaf/68747470733a2f2f7075626c69632d6173736574732e616e64726577647965722e726f636b732f696d616765732f636f766572732f7072656469732d61646170746f722e706e67)

🗄️ Predis Adaptor
=================

[](#️-predis-adaptor)

A simple framework-agnostic caching solution using Redis.

📄 License
---------

[](#-license)

Licensed under the [MIT license](https://opensource.org/licenses/MIT) and is free for private or commercial projects.

✨ Introduction
--------------

[](#-introduction)

Predis Adaptor provides a straightforward way to implement caching operations using Redis in any PHP application. The library offers an easy-to-use interface for storing, retrieving, and managing cached data, supports custom cache configurations, and provides flexible cache management methods.

📥 Installation
--------------

[](#-installation)

```
composer require andrewdyer/predis-adaptor
```

🚀 Getting Started
-----------------

[](#-getting-started)

To start using Predis Adaptor, you need to initialize the cache by creating a new instance of the `Cache` class with the necessary configuration options.

```
use Anddye\PredisAdaptor\Cache;

$cache = new Cache([
    'host'      => '',
    'password'  => '',
    'port'      => '',
    'scheme'    => '',
]);
```

### Supported Options

[](#supported-options)

OptionTypeDefaultDescriptionhoststring127.0.0.1IP or hostname of the target server.passwordstringnot setAccepts a value used to authenticate with a Redis server protected by password with the `AUTH` command.portstring6379TCP/IP port of the target server.schemestringtcpSpecifies the protocol used to communicate with an instance of Redis.📖 Usage
-------

[](#-usage)

### Client

[](#client)

Returns the underlying Predis client instance.

```
$client = $cache->client();
```

### Delete

[](#delete)

Deletes the specified key from the cache.

```
$cache->delete('my_key');
```

### Exists

[](#exists)

Checks if the specified key exists in the cache.

```
$bool = $cache->exists('my_key');
```

### Get

[](#get)

Retrieves the value of the specified key from the cache.

```
$value = $cache->get('my_key');
```

### Put

[](#put)

Stores a value in the cache with the specified key.

```
$cache->put('my_key', 'my_value');
```

### Remember

[](#remember)

Retrieves the value of the specified key from the cache, or stores the result of the callback if the key does not exist.

```
$value = $cache->remember('my_key', 10, function () {
    return 'my_value';
});
```

Useful Links
------------

[](#useful-links)

- [Redis](http://redis.io/)
- [Predis](https://github.com/nrk/predis)
- [Install and config Redis on Mac OS X via Homebrew](https://medium.com/@petehouston/install-and-config-redis-on-mac-os-x-via-homebrew-eb8df9a4f298)

###  Health Score

42

—

FairBetter than 89% of packages

Maintenance60

Regular maintenance activity

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity78

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

Total

5

Last Release

460d ago

Major Versions

0.1.0 → v1.0.02019-07-09

PHP version history (2 changes)0.1.0PHP &gt;=5.3.9

1.3.0PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/666597ea6e46748a89fe8764d1a45b4d0da97daf1bb1e9770ea34ae41f706d08?d=identicon)[andrewdyer](/maintainers/andrewdyer)

---

Top Contributors

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

---

Tags

adaptorframework-agnosticphppredisredisphpredispredisframework agnosticadaptor

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/andrewdyer-predis-adaptor/health.svg)

```
[![Health](https://phpackages.com/badges/andrewdyer-predis-adaptor/health.svg)](https://phpackages.com/packages/andrewdyer-predis-adaptor)
```

###  Alternatives

[mjphaynes/php-resque

Redis backed library for creating background jobs and processing them later.

228199.3k2](/packages/mjphaynes-php-resque)[predis/service-provider

Predis service provider for the Silex microframework

68546.6k1](/packages/predis-service-provider)[maykonn/codeigniter-predis

The CodeIgniter Redis package

129.3k](/packages/maykonn-codeigniter-predis)[quick/cache

This is a cache system that uses Redis for rapid caching.

122.7k](/packages/quick-cache)

PHPackages © 2026

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