PHPackages                             daynnnnn/statamic-swr-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. daynnnnn/statamic-swr-cache

ActiveLibrary[Caching](/categories/caching)

daynnnnn/statamic-swr-cache
===========================

Allows you to add stale while revalidate functionality to the application static cache driver.

v1.1.2(4y ago)1145PHP

Since Oct 23Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Daynnnnn/statamic-swr-cache)[ Packagist](https://packagist.org/packages/daynnnnn/statamic-swr-cache)[ RSS](/packages/daynnnnn-statamic-swr-cache/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (3)Versions (5)Used By (0)

Statamic SWR Static Cache
-------------------------

[](#statamic-swr-static-cache)

Allows you to add stale while revalidate functionality to the application static cache driver.

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

[](#requirements)

This add-on currently requires you to use Redis as a cache driver.

Additionally, you'll need to process queue items with a separate worker - if you're using the `sync` driver, this add-on won't have any effect.

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

[](#installation)

From a standard Statamic V3 site, you can run:

`composer require daynnnnn/statamic-swr-cache`

Then you'll just need to add the stale while revalidate strategy to your static cache config:

```

'strategies' => [
    ...
    'swr' => [
        'driver' => 'swr',
        'expiry' => '60',
        'stale' => '5',
    ],
],

```

### How it works

[](#how-it-works)

In the above example, cached pages will stay in the cache for 60 minutes (expiry), but if the cached page is accessed when the cache is over 5 minutes old (stale), a background job will run to update the cache, but the currently cached page will still be served.

Other than this, the cache will stay the same as the application cache.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

4

Last Release

1657d ago

### Community

Maintainers

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

---

Top Contributors

[![Daynnnnn](https://avatars.githubusercontent.com/u/25618897?v=4)](https://github.com/Daynnnnn "Daynnnnn (5 commits)")

### Embed Badge

![Health badge](/badges/daynnnnn-statamic-swr-cache/health.svg)

```
[![Health](https://phpackages.com/badges/daynnnnn-statamic-swr-cache/health.svg)](https://phpackages.com/packages/daynnnnn-statamic-swr-cache)
```

###  Alternatives

[predis/predis

A flexible and feature-complete Redis/Valkey client for PHP.

7.8k305.7M2.4k](/packages/predis-predis)[snc/redis-bundle

A Redis bundle for Symfony

1.0k39.4M67](/packages/snc-redis-bundle)[react/cache

Async, Promise-based cache interface for ReactPHP

444112.4M40](/packages/react-cache)[illuminate/cache

The Illuminate Cache package.

12835.6M1.4k](/packages/illuminate-cache)[colinmollenhour/php-redis-session-abstract

A Redis-based session handler with optimistic locking

6325.6M14](/packages/colinmollenhour-php-redis-session-abstract)[amphp/redis

Efficient asynchronous communication with Redis servers, enabling scalable and responsive data storage and retrieval.

165634.7k44](/packages/amphp-redis)

PHPackages © 2026

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