PHPackages                             quinninteractive/silverstripe-clearkey - 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. quinninteractive/silverstripe-clearkey

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

quinninteractive/silverstripe-clearkey
======================================

Silverstripe module to manage partial-cache invalidation

2.0.0(6mo ago)01.7k↓50%BSD-3-ClausePHPPHP ^8.1

Since Oct 13Pushed 6mo ago2 watchersCompare

[ Source](https://github.com/Quinn-Interactive/silverstripe-clearkey)[ Packagist](https://packagist.org/packages/quinninteractive/silverstripe-clearkey)[ RSS](/packages/quinninteractive-silverstripe-clearkey/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelogDependencies (10)Versions (6)Used By (0)

ClearKey: A Silverstripe module to manage partial-cache invalidation
====================================================================

[](#clearkey-a-silverstripe-module-to-manage-partial-cache-invalidation)

When using Silverstripe’s partial caching, the keys you use can usually be grouped into two types.

1. Cache *identifier* keys, which help tell one cache block from another
2. Cache *clearing* keys, which tell us when a block is stale

Take this partial-cache block as an example:

```

...

```

These *identifier* keys help tell one promo from another:

- `'Promo'`
- `$ID`
- `$Link`

These *clearing* keys help tell us when the content is stale:

- `Promo.LastEdited`
- `$List('SiteTree').max('LastEdited')`
- `$List('SiteTree').count()`

Partial caches do a great job with *identifier* keys, but have to hit the database at every page load to calculate some of the *clearing* keys, especially the aggregation ones.

ClearKey solves this by letting you manage the calculating of clearing of stale data whenever a relevant data object is saved, instead of on every page load. With ClearKey, the example cache block might look like this:

```

...

```

You define the clear keys with a corresponding config to describe which classes being updated should invalidate each key. In the example below, the `Promo` key is invaldated whenever a `Promo` or `SiteTree` is saved.

```
---
Name: clearkey-config
After:
  - '#corecache'
---
QuinnInteractive\ClearKey\Extensions\ClearKeyExtension:
  invalidators:
    Promo:
      - SilverStripe\App\Model\Promo
      - SilverStripe\CMS\Model\SiteTree
    AnotherKey:
      - SilverStripe\App\Model\Something
      - SilverStripe\CMS\Model\Etc

```

Current version: 2.0.0

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance67

Regular maintenance activity

Popularity19

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 55.6% 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 ~560 days

Total

3

Last Release

193d ago

Major Versions

1.0.0 → 2.0.02025-11-06

PHP version history (2 changes)1.0.0-rc1PHP ^8.0 || ^7.4

2.0.0PHP ^8.1

### Community

Maintainers

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

---

Top Contributors

[![phil-quinn](https://avatars.githubusercontent.com/u/1178418?v=4)](https://github.com/phil-quinn "phil-quinn (5 commits)")[![oddnoc](https://avatars.githubusercontent.com/u/568583?v=4)](https://github.com/oddnoc "oddnoc (4 commits)")

---

Tags

silverstripecachecachingkeyinvalidationflush

###  Code Quality

Static AnalysisPHPStan, Rector

Type Coverage Yes

### Embed Badge

![Health badge](/badges/quinninteractive-silverstripe-clearkey/health.svg)

```
[![Health](https://phpackages.com/badges/quinninteractive-silverstripe-clearkey/health.svg)](https://phpackages.com/packages/quinninteractive-silverstripe-clearkey)
```

###  Alternatives

[silverstripe/cms

The SilverStripe Content Management System

5163.4M1.3k](/packages/silverstripe-cms)[silverstripe/staticpublishqueue

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

45135.4k4](/packages/silverstripe-staticpublishqueue)[tractorcow/silverstripe-dynamiccache

FORK OF Silverstripe module for simple on the fly caching of dynamic content

3916.0k2](/packages/tractorcow-silverstripe-dynamiccache)[pstaender/silverstripe-redis-cache

Enables Redis cache for SilverStripe

1199.1k](/packages/pstaender-silverstripe-redis-cache)[silverstripe-terraformers/keys-for-cache

Silverstripe cache key management

1726.6k](/packages/silverstripe-terraformers-keys-for-cache)[steadlane/silverstripe-cloudflare

This module aims to relieve the stress of using Cloudflare caching with any SilverStripe project. Adds extension hooks that clears Cloudflare's cache for a specific page when that page is published or unpublished.

243.7k](/packages/steadlane-silverstripe-cloudflare)

PHPackages © 2026

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