PHPackages                             dcentrica/silverstripe-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. dcentrica/silverstripe-redis-cache

ActiveSilverstripe-vendormodule[Caching](/categories/caching)

dcentrica/silverstripe-redis-cache
==================================

Enables Redis cache for Silverstripe

1.0.0(1mo ago)0225BSD-3-ClausePHPCI failing

Since Feb 27Pushed 1mo agoCompare

[ Source](https://github.com/dcentrica/silverstripe-redis-cache)[ Packagist](https://packagist.org/packages/dcentrica/silverstripe-redis-cache)[ Docs](https://github.com/dcentrica/silverstripe-redis-cache)[ RSS](/packages/dcentrica-silverstripe-redis-cache/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

Redis Cache for SilverStripe
============================

[](#redis-cache-for-silverstripe)

Enables usage of redis cache for Silverstripe.

[![status](https://github.com/pstaender/silverstripe-redis-cache/actions/workflows/ci.yml/badge.svg)](https://github.com/pstaender/silverstripe-redis-cache/actions/workflows/ci.yml/badge.svg)

Requirements
------------

[](#requirements)

- SilverStripe v4, v5, or v6
- Redis/Valkey/DragonFly
- Tested on PHP 7.3+

Pre-install
-----------

[](#pre-install)

Ensure you have Redis or a Redis-like system installed in your environment and configured within your php ini files to ensure PHP knows where to find it.

To install Redis, a quick Google with your OS name and version, your PHP version, and server and the version that your're working with (E.G. Apache or Nginx) should yield a number of installation instructions such as [this installation instruction example.](https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-redis-on-ubuntu-18-04)

Add the following to your php.ini or conf.d/{your-custom-php-config-file}.ini to let PHP know where to communicate with Redis to store session data: **Note:** Missing this step will lead to login issues when working with providers such as AWS where you have your site running on multiple pods but need sessions to be unified across them.

```
session.save_handler  = redis
session.save_path     = {your_redis_url}

```

In containerised environments, the [Redis](https://pecl.php.net/package/redis) PHP extensions which is available from Pecl.

Installation and usage
----------------------

[](#installation-and-usage)

Use composer to pull this module into your project:

```
  $ composer require dcentrica/silverstripe-redis-cache

```

To enable Redis cache in your Silverstripe project, add one or both of the following yaml configs to your project under `/app/_config/` in either their own yaml file, or in an existing file such as `app.yml`.

**Note:** The `REDIS_URL` must be the url of the used redis instance, e.g. `tcp://127.0.0.1:6379`.

Usage in your project
---------------------

[](#usage-in-your-project)

```
---
Name: silverstripe-redis-cache
After:
  - '#corecache'
  - '#assetscache'
Only:
  envvarset: REDIS_URL
---
SilverStripe\Core\Injector\Injector:
  # Redis PHP client
  RedisClient:
    class: Predis\Client
    constructor:
      0: '`MP_REDIS_HOST`'
  # Silverstripe Redis backend
  RedisCacheFactory:
    class: Zeitpulse\RedisCacheFactory
    constructor:
      client: '%$RedisClient'
  SilverStripe\Core\Cache\CacheFactory: '%$RedisCacheFactory'

  # Service-specific cache segements
  Psr\SimpleCache\CacheInterface.DMService_APICache:
    factory: RedisCacheFactory

  # vendor/silverstripe/assets/_config/assetscache.yml
  Psr\SimpleCache\CacheInterface.InterventionBackend_Manipulations:
    factory: RedisCacheFactory
    constructor:
      namespace: 'InterventionBackend_Manipulations'
      defaultLifetime: 600 # 10 mins

  Psr\SimpleCache\CacheInterface.FileShortcodeProvider:
    factory: RedisCacheFactory
    constructor:
      namespace: 'FileShortcodeProvider'
      defaultLifetime: 600 # 10 mins
```

Usage with flysystem asset storage
----------------------------------

[](#usage-with-flysystem-asset-storage)

```
---
Name: silverstripes3-flysystem-redis
Only:
  envvarset:
    - REDIS_URL
After:
  - '#silverstripes3-flysystem'
---
SilverStripe\Core\Injector\Injector:
  League\Flysystem\Cached\Storage\Memory.public:
    class: League\Flysystem\Cached\Storage\Predis
  League\Flysystem\Cached\Storage\Adapter.public:
    class: League\Flysystem\Cached\Storage\Predis
  League\Flysystem\Cached\Storage\Adapter.protected:
    class: League\Flysystem\Cached\Storage\Predis
```

Licence
-------

[](#licence)

BSD-3

Credits
-------

[](#credits)

Authors:

- [Philipp Staender](https://github.com/pstaender)
- [Michael Houghton](https://github.com/Oireachtas)

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance90

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor2

2 contributors hold 50%+ of commits

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

50d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/40150397?v=4)[Dcentrica](/maintainers/dcentrica)[@dcentrica](https://github.com/dcentrica)

---

Top Contributors

[![dcentrica](https://avatars.githubusercontent.com/u/40150397?v=4)](https://github.com/dcentrica "dcentrica (15 commits)")[![pstaender](https://avatars.githubusercontent.com/u/140571?v=4)](https://github.com/pstaender "pstaender (12 commits)")[![elliot-sawyer](https://avatars.githubusercontent.com/u/354793?v=4)](https://github.com/elliot-sawyer "elliot-sawyer (2 commits)")[![sunnysideup](https://avatars.githubusercontent.com/u/167154?v=4)](https://github.com/sunnysideup "sunnysideup (2 commits)")[![taoceanz](https://avatars.githubusercontent.com/u/9561656?v=4)](https://github.com/taoceanz "taoceanz (2 commits)")

---

Tags

silverstriperediscachevalkey

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dcentrica-silverstripe-redis-cache/health.svg)

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

###  Alternatives

[pstaender/silverstripe-redis-cache

Enables Redis cache for SilverStripe

11102.0k](/packages/pstaender-silverstripe-redis-cache)[silverstripe/staticpublishqueue

Static publishing queue to create static versions of pages for enhanced performance and security

44138.6k6](/packages/silverstripe-staticpublishqueue)[byerikas/cache-tags

Allows for Redis/Valkey cache flushing multiple tagged items by a single tag.

1418.0k](/packages/byerikas-cache-tags)[silverstripe-terraformers/keys-for-cache

Silverstripe cache key management

1628.5k](/packages/silverstripe-terraformers-keys-for-cache)[abouvier/slim-redis-cache

Redis cache middleware for Slim framework

172.0k](/packages/abouvier-slim-redis-cache)[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)
