PHPackages                             wyrihaximus/react-cache-fallback - 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. wyrihaximus/react-cache-fallback

ActiveLibrary[Caching](/categories/caching)

wyrihaximus/react-cache-fallback
================================

Fallback decorator for react/cache

2.2.0(5y ago)11.6k[4 PRs](https://github.com/WyriHaximus/reactphp-cache-fallback/pulls)MITPHPPHP ^8 || ^7.4

Since Sep 3Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/WyriHaximus/reactphp-cache-fallback)[ Packagist](https://packagist.org/packages/wyrihaximus/react-cache-fallback)[ GitHub Sponsors](https://github.com/WyriHaximus)[ RSS](/packages/wyrihaximus-react-cache-fallback/feed)WikiDiscussions master Synced yesterday

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

Fallback cache decorator
========================

[](#fallback-cache-decorator)

[![Build Status](https://camo.githubusercontent.com/81ac062d82d9df7fa431b732d67bf028c34f7e6151c41d13f37507c0ea361efe/68747470733a2f2f7472617669732d63692e636f6d2f57797269486178696d75732f72656163747068702d63616368652d66616c6c6261636b2e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/WyriHaximus/reactphp-cache-fallback)[![Latest Stable Version](https://camo.githubusercontent.com/d920ce121c866101551ee2d00daf2c6bc8c61af7923a5530a585a741601424bf/68747470733a2f2f706f7365722e707567782e6f72672f57797269486178696d75732f72656163742d63616368652d66616c6c6261636b2f762f737461626c652e706e67)](https://packagist.org/packages/WyriHaximus/react-cache-fallback)[![Total Downloads](https://camo.githubusercontent.com/b2ae7513bb98b935f80e7be14728da10c57bd1c86e34149d2b54823934b18fb3/68747470733a2f2f706f7365722e707567782e6f72672f57797269486178696d75732f72656163742d63616368652d66616c6c6261636b2f646f776e6c6f6164732e706e67)](https://packagist.org/packages/WyriHaximus/react-cache-fallback)[![Code Coverage](https://camo.githubusercontent.com/223c181ca103fa43906068253db7e3fd3558a3a76b87f93f6386620b9bc43ee2/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f57797269486178696d75732f72656163747068702d63616368652d66616c6c6261636b2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/WyriHaximus/reactphp-cache-fallback/?branch=master)[![License](https://camo.githubusercontent.com/f5f0e180946b4bbe4f0905fcb621644190d0956a21c7ac4f4455e0fa1cdd13a8/68747470733a2f2f706f7365722e707567782e6f72672f57797269486178696d75732f72656163742d63616368652d66616c6c6261636b2f6c6963656e73652e706e67)](https://packagist.org/packages/WyriHaximus/react-cache-fallback)[![PHP 7 ready](https://camo.githubusercontent.com/185b2e8540e76b59278c1fb39b942f96248c075364130c17249d371d482d8487/687474703a2f2f7068703772656164792e74696d6573706c696e7465722e63682f57797269486178696d75732f72656163747068702d63616368652d66616c6c6261636b2f62616467652e737667)](https://travis-ci.org/WyriHaximus/reactphp-cache-fallback)

Installation
============

[](#installation)

To install via [Composer](http://getcomposer.org/), use the command below, it will automatically detect the latest version and bind it with `^`.

```
composer require wyrihaximus/react-cache-fallback

```

Usage
=====

[](#usage)

The following example will first try to get he item from the `ArrayCache` before falling back to `$fallback` on `get`. When it gets something from `$fallback` it will also set it to `ArrayCache`. All `set` and `delete` calls will go to both.

```
$cache = new Fallback(
    new ArrayCache(5),
    $fallback
);
```

License
=======

[](#license)

The MIT License (MIT)

Copyright (c) 2018 Cees-Jan Kiewiet

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance43

Moderate activity, may be stable

Popularity17

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 65.2% 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 ~310 days

Total

4

Last Release

1877d ago

Major Versions

1.0.0 → 2.0.02019-07-12

PHP version history (3 changes)1.0.0PHP ^7.2

2.1.0PHP ^7.4

2.2.0PHP ^8 || ^7.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/147145?v=4)[Cees-Jan Kiewiet](/maintainers/WyriHaximus)[@WyriHaximus](https://github.com/WyriHaximus)

---

Top Contributors

[![WyriHaximus](https://avatars.githubusercontent.com/u/147145?v=4)](https://github.com/WyriHaximus "WyriHaximus (60 commits)")[![dependabot-support](https://avatars.githubusercontent.com/u/112581971?v=4)](https://github.com/dependabot-support "dependabot-support (16 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (14 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (2 commits)")

---

Tags

hacktoberfest

### Embed Badge

![Health badge](/badges/wyrihaximus-react-cache-fallback/health.svg)

```
[![Health](https://phpackages.com/badges/wyrihaximus-react-cache-fallback/health.svg)](https://phpackages.com/packages/wyrihaximus-react-cache-fallback)
```

###  Alternatives

[predis/predis

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

7.8k305.7M2.4k](/packages/predis-predis)[react/cache

Async, Promise-based cache interface for ReactPHP

444112.4M40](/packages/react-cache)[snc/redis-bundle

A Redis bundle for Symfony

1.0k39.4M67](/packages/snc-redis-bundle)[team-reflex/discord-php

An unofficial API to interact with the voice and text service Discord.

1.1k379.4k24](/packages/team-reflex-discord-php)[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)

PHPackages © 2026

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