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

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

pstaender/silverstripe-redis-cache
==================================

Enables Redis cache for SilverStripe

v0.0.3(3y ago)11102.0k↓54.1%7[2 issues](https://github.com/pstaender/silverstripe-redis-cache/issues)MITPHPCI failing

Since Oct 22Pushed 2y ago2 watchersCompare

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

READMEChangelog (3)Dependencies (3)Versions (5)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
- Redis
- Tested on PHP 7.3+

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

[](#pre-install)

Ensure you have redis installed in your environment and configured within your php ini files to ensure PHP knows where to access Redis.

To install Redis, a quick Google with your OS name and version, your PHP version, and server and it's 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}

```

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

[](#installation-and-usage)

Use composer to pull this module into your project:

```
  $ composer require pstaender/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 `mysite.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:
  RedisClient:
    class: Predis\Client
    constructor:
      0: '`REDIS_URL`'
  RedisCacheFactory:
    class: Zeitpulse\RedisCacheFactory
    constructor:
      client: '%$RedisClient'
  SilverStripe\Core\Cache\CacheFactory: '%$RedisCacheFactory'

  # vendor/silverstripe/assets/_config/assetscache.yml
  Psr\SimpleCache\CacheInterface.InterventionBackend_Manipulations:
    factory: RedisCacheFactory
  Psr\SimpleCache\CacheInterface.FileShortcodeProvider:
    factory: RedisCacheFactory
  Psr\SimpleCache\CacheInterface.ImageShortcodeProvider:
    factory: RedisCacheFactory

  # vendor/silverstripe/assets/_config/assetscache.yml
  Psr\SimpleCache\CacheInterface.Sha1FileHashingService:
    factory: RedisCacheFactory

  # vendor/silverstripe/cms/_config/cache.yml
  Psr\SimpleCache\CacheInterface.CMSMain_SiteTreeHints:
    factory: RedisCacheFactory
  Psr\SimpleCache\CacheInterface.SiteTree_CreatableChildren:
    factory: RedisCacheFactory
  Psr\SimpleCache\CacheInterface.SiteTree_PageIcons:
    factory: RedisCacheFactory

  # vendor/silverstripe/cms/_config/permissions.yml +
  # vendor/silverstripe/framework/_config/cache.yml
  Psr\SimpleCache\CacheInterface.InheritedPermissions:
    factory: RedisCacheFactory

  # vendor/silverstripe/framework/_config/cache.yml
  Psr\SimpleCache\CacheInterface.cacheblock:
    factory: RedisCacheFactory
  Psr\SimpleCache\CacheInterface.VersionProvider_composerlock:
    factory: RedisCacheFactory
  Psr\SimpleCache\CacheInterface.RateLimiter:
    factory: RedisCacheFactory
  Psr\SimpleCache\CacheInterface.ThemeResourceLoader:
    factory: RedisCacheFactory
  Psr\SimpleCache\CacheInterface.DatabaseAdapterRegistry:
    factory: RedisCacheFactory
  Psr\SimpleCache\CacheInterface.EmbedShortcodeProvider:
    factory: RedisCacheFactory
```

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)

MIT

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity40

Moderate usage in the ecosystem

Community16

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

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

Total

3

Last Release

1127d ago

### Community

Maintainers

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

---

Top Contributors

[![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

silverstriperediscache

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[contributte/redis

Redis client integration into Nette framework

191.7M2](/packages/contributte-redis)[silverstripe/staticpublishqueue

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

44138.6k6](/packages/silverstripe-staticpublishqueue)[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)
