PHPackages                             peloncano/cakephp-plugin-redis-cache - 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. peloncano/cakephp-plugin-redis-cache

ActiveCakephp-plugin[Caching](/categories/caching)

peloncano/cakephp-plugin-redis-cache
====================================

A CakePHP 2.0 plugin enabling Redis (http://redis.io/) backed sessions and caching. Uses the Predis (https://github.com/nrk/predis) library to communicate with Redis.

1.1.0(6y ago)0524PHPPHP &gt;=5.3.0

Since Aug 20Pushed 6y agoCompare

[ Source](https://github.com/peloncano/RedisCache)[ Packagist](https://packagist.org/packages/peloncano/cakephp-plugin-redis-cache)[ RSS](/packages/peloncano-cakephp-plugin-redis-cache/feed)WikiDiscussions master Synced 3d ago

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

RedisCache CakePHP 2.x Plugin
=============================

[](#rediscache-cakephp-2x-plugin)

A CakePHP 2.x plugin enabling [Redis](http://redis.io/) backed sessions and caching. Uses the [Predis](https://github.com/nrk/predis) library to communicate with Redis.

> Had to resurrect this plugin for a legacy project that needed to connect to redis via TLS/SSL.

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

[](#installation)

Run composer command

```
composer require peloncano/cakephp-plugin-redis-cache

```

Initial setup required
----------------------

[](#initial-setup-required)

The plugin includes its own `bootstrap.php` file which must be loaded in the application `app/Config/bootstrap.php` file like so:

```
CakePlugin::load(array('RedisCache' => array('bootstrap' => true)));

```

The plugin will, by default, communicate with a Redis server setup on `localhost` at port `6379` with no password. However you may use remote Redis servers if desired. You can also configure different servers for caching and session duties as the exact configuration of these may be slightly different for best performance.

Using for Caching:
------------------

[](#using-for-caching)

### Connection configuration

[](#connection-configuration)

if loading a configuration file ([Doc](https://book.cakephp.org/2.0/en/development/configuration.html#loading-configuration-files)):

```
$config['RedisCache'] = array(
    'cache' => array(
        'password' => '',
        'port' => 6379,
        'database' => 0
    )
);

```

If TLS/SSL is needed:

```
$config['RedisCache'] = array(
    'cache' => array(
        'scheme' => 'tls',
        'ssl' => ['verify_peer' => false], // any other predis SSL related options here
        'host' => 'localhost',
        'password' => '',
        'port' => 6379, // could be different for tls connections
        'database' => 0
    )
);

```

In `app/Config/bootstrap.php` you can now configure your cache

> Note: Make sure this is done after the loading of the plugin

```
Cache::config('default', array('engine' => 'RedisCache.Redis'));

// with prefix and duration
Cache::config('other_cache_with_prefix', array(
		'engine' => 'RedisCache.Redis',
		'prefix' => 'other_cache_with_prefix',
		'duration'=> '+1 week'
));

// `throwExceptions` set to TRUE will throw exceptions on redis connection issues
// by default this is FALSE which will allow the app to continue working if caching fails
// due to redis/predis connection issues
Cache::config('other_cache', array(
		'engine' => 'RedisCache.Redis',
		'throwExceptions' => true
));

```

Using for Session handling (PENDING):
-------------------------------------

[](#using-for-session-handling-pending)

In `app/Config/core.php` under the session configuration section:

```
Configure::write('Session', array(
        'cookie' => {{YOUR COOKIE NAME HERE}}
        , 'timeout' => 60
        , 'handler' => array(
            'engine' => 'RedisCache.RedisSession'
        )
	));

```

Global Prefix
-------------

[](#global-prefix)

You can add a global prefix to namespace all keys by adding the following lines right after the plugin is loaded.

For `Cache`:

```
RedisConfig::$globalCachePrefix = Inflector::slug('my app cache prefix') . ':'; // use ':' to group keys in redis

```

For `Session`:

```
RedisConfig::$globalSessionPrefix= Inflector::slug('my app session prefix') . ':'; // use ':' to group keys in redis

```

> Note: This would apply before any cache specific prefix

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.1% 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 ~1 days

Total

4

Last Release

2457d ago

### Community

Maintainers

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

---

Top Contributors

[![luis-cano-wpp](https://avatars.githubusercontent.com/u/114530681?v=4)](https://github.com/luis-cano-wpp "luis-cano-wpp (16 commits)")[![peloncano](https://avatars.githubusercontent.com/u/1165911?v=4)](https://github.com/peloncano "peloncano (1 commits)")

### Embed Badge

![Health badge](/badges/peloncano-cakephp-plugin-redis-cache/health.svg)

```
[![Health](https://phpackages.com/badges/peloncano-cakephp-plugin-redis-cache/health.svg)](https://phpackages.com/packages/peloncano-cakephp-plugin-redis-cache)
```

###  Alternatives

[wp-media/wp-rocket

Performance optimization plugin for WordPress

7431.3M3](/packages/wp-media-wp-rocket)[rhubarbgroup/redis-cache

A persistent object cache backend for WordPress powered by Redis. Supports Predis, PhpRedis, Relay, replication, sentinels, clustering and WP-CLI.

51795.3k1](/packages/rhubarbgroup-redis-cache)[symfony-bundles/redis-bundle

Symfony Redis Bundle

271.1M5](/packages/symfony-bundles-redis-bundle)[pdffiller/qless-php

PHP Bindings for qless

29113.2k1](/packages/pdffiller-qless-php)[humanmade/batcache

A memcached HTML page cache for WordPress.

16447.7k4](/packages/humanmade-batcache)

PHPackages © 2026

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