PHPackages                             colourbox/simplesamlphp-module-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. colourbox/simplesamlphp-module-redis

ActiveSimplesamlphp-module[Caching](/categories/caching)

colourbox/simplesamlphp-module-redis
====================================

A SimpleSAMLphp module for using Redis for session storage etc.

1.1.0(9y ago)486.1k↓31.3%5[2 PRs](https://github.com/ColourboxDevelopment/simplesamlphp-module-redis/pulls)MITPHPPHP ^5.4 || ^7.0CI failing

Since Jan 19Pushed 7y ago1 watchersCompare

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

READMEChangelog (6)Dependencies (13)Versions (7)Used By (0)

Redis module for simpleSAMLphp
==============================

[](#redis-module-for-simplesamlphp)

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

[](#introduction)

The Redis module implements the simpleSAMLphp data store API, so Redis can be used for backend storage, i.e. session storage.

[![Build Status](https://camo.githubusercontent.com/efb06ec392ee6773498c5e9ccb759f35edb7700c5db9b50354964a0a8c8b3ef9/68747470733a2f2f7472617669732d63692e6f72672f436f6c6f7572626f78446576656c6f706d656e742f73696d706c6573616d6c7068702d6d6f64756c652d72656469732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ColourboxDevelopment/simplesamlphp-module-redis)

Prerequisites
-------------

[](#prerequisites)

This module requires the following

- simpleSAMLphp v. 1.14.11 (Works with older version, but you should update)
- Redis server, See  for more information

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

[](#installation)

First thing to do is to set up your Redis server(s). This is out side the scope of this documentation.

Next you must install this module either by either obtaining the tarball or by installing it via composer. The latter is recommended

```
composer.phar require colourbox/simplesamlphp-module-redis

```

This will automatically install "predis/predis" as a dependency for ther module. If you downloaded the module yourself, remember to add predis/predis as a dependency in your composer.json.

See  for more information on how to install simpleSAMLphp modules via composer.

You can now enable the module by

```
touch /var/simplesamlphp/modules/redis/enable

```

Create `/var/simplesamlphp/config/module_redis.php` and set appropriate options for your Redis server. A configuration file template can be found in the

Redis is used as session store for simpleSAMLphp by setting the following options in config.php

```
'store.type' => 'redis:Redis'

```

Configuration options
---------------------

[](#configuration-options)

- `parameters` Connection parameters for the underlying predis client. See [connection parameters](https://github.com/nrk/predis/wiki/Connection-Parameters) for details
- `options` Client options for the underlying predis client. See [options](https://github.com/nrk/predis/wiki/Client-Options) for details
- `prefix` Key prefix for all keys stored in Redis
- `lifetime` Default lifetime for non-expiring keys in Redis
- `oldHost` configuration for old Redis host when doing rollover
    - `parameters` Connection parameters for the underlying predis client
    - `options` Client options for the underlying predis client

### Example

[](#example)

```
$config = [
    // Predis client parameters
    'parameters' => 'tcp://localhost:6379',

    // Predis client options
    'options' => null,

    // Key prefix
    'prefix' => 'simpleSAMLphp',

    // Lifitime for all non expiring keys
    'lifetime' => 288000
];

```

Rollover to new server
----------------------

[](#rollover-to-new-server)

The module has build in support for doing rolling update to a new Redis host. All writes are only done to the new host, but all reads will fall back to the old host if the value is not found on new host.

### How-to

[](#how-to)

- Start new Redis host
- Add new host to config file (`parameters` and `options`) and add the old host to `oldHost` option
- Wait until max session lifetime have expired
- Remove `oldHost` config
- Shut down old Redis host

### Configuration example

[](#configuration-example)

```
$config = [
    // Predis client parameters
    'parameters' => 'tcp://newhost:6379',

    // Predis client options
    'options' => null,

    // Old host
    'oldHost' => [
        // Predis client parameters
        'parameters' => 'tcp://oldhost:6379',

        // Predis client options
        'options' => null,
    ],

    // Key prefix
    'prefix' => 'simpleSAMLphp',

    // Lifitime for all non expiring keys
    'lifetime' => 288000
];

```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% 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 ~157 days

Recently: every ~197 days

Total

6

Last Release

3350d ago

Major Versions

0.1.3 → 1.0.02017-03-17

PHP version history (3 changes)0.1.1PHP &gt;=5.4.0

1.0.0PHP ^5.4

1.1.0PHP ^5.4 || ^7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/57361369dedf1ed80d667bb89f519bfa14466d8c1ae6400685842352b67e12bf?d=identicon)[ColourboxDeveloper](/maintainers/ColourboxDeveloper)

---

Top Contributors

[![kaareatcolourboxdotcom](https://avatars.githubusercontent.com/u/2698429?v=4)](https://github.com/kaareatcolourboxdotcom "kaareatcolourboxdotcom (2 commits)")[![colourbox-bot](https://avatars.githubusercontent.com/u/160585178?v=4)](https://github.com/colourbox-bot "colourbox-bot (1 commits)")

---

Tags

redisstoresimplesamlphp

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/colourbox-simplesamlphp-module-redis/health.svg)

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

###  Alternatives

[predis/predis-async

Asynchronous version of Predis

366348.4k](/packages/predis-predis-async)[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)[monospice/laravel-redis-sentinel-drivers

Redis Sentinel integration for Laravel and Lumen.

103830.5k](/packages/monospice-laravel-redis-sentinel-drivers)[predis/service-provider

Predis service provider for the Silex microframework

68546.6k1](/packages/predis-service-provider)[jamescauwelier/psredis

Sentinel client for the popular php redis client

77392.9k5](/packages/jamescauwelier-psredis)[cache/predis-adapter

A PSR-6 cache implementation using Redis (Predis). This implementation supports tags

272.6M13](/packages/cache-predis-adapter)

PHPackages © 2026

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