PHPackages                             eufony/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. eufony/cache

ActiveLibrary[Caching](/categories/caching)

eufony/cache
============

Essentials for getting started with PSR-6 and PSR-16 caching.

v1.1.0(2y ago)0431LGPL-3.0-or-laterPHPPHP ^8.1

Since Feb 5Pushed 2y ago1 watchersCompare

[ Source](https://github.com/eufony/cache)[ Packagist](https://packagist.org/packages/eufony/cache)[ RSS](/packages/eufony-cache/feed)WikiDiscussions v1.x Synced 1w ago

READMEChangelogDependencies (5)Versions (14)Used By (1)

The Eufony Cache Package
========================

[](#the-eufony-cache-package)

 [ ![Packagist Downloads](https://camo.githubusercontent.com/baff9fe5342f5d99f559daa8b6234d79a8ef1adeb387fe3028bda1b19a8b388a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6575666f6e792f63616368653f6c6162656c3d5061636b6167697374253230446f776e6c6f616473) ](https://packagist.org/packages/eufony/cache) [ ![GitHub Stars](https://camo.githubusercontent.com/957bf89ffd8591244506bc978acefea05412bde7ae7399e0411c45ee381f5338/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6575666f6e792f63616368653f6c6162656c3d4769744875622532305374617273) ](https://github.com/eufony/cache) [ ![Issues](https://camo.githubusercontent.com/aee269a9e396577e49520682062dfe6419de775b466366e37819585a4be53826/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6575666f6e792f63616368652f6f70656e3f6c6162656c3d497373756573) ](https://github.com/eufony/cache/issues)
 [ ![License](https://camo.githubusercontent.com/2819b93c275ada44756c05c5af28513f1633c56bb6e95d24a91b5b5679c14018/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6575666f6e792f63616368653f6c6162656c3d4c6963656e7365) ](https://github.com/eufony/cache#license) [ ![Community Built](https://camo.githubusercontent.com/db7f0b0f807877959a4badf1f8b12ae274bdf86899e95fc41e39aefb6ba5cc1c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d616465253230776974682d2545322539442541342d726564) ](https://github.com/eufony/cache#contributing)

*eufony/cache provides the most trivial implementations of PSR-6 and PSR-16 as well as other essentials for getting started with caching.*

*eufony/cache* is a small PHP library that handles basic caching needs without overcomplicating things. It implements the simplest kinds cache pools, supporting both the [PSR-6](https://www.php-fig.org/psr/psr-6/)and [PSR-16](https://www.php-fig.org/psr/psr-16/) standards, plus:

- Adapter classes to convert between PSR-6 and PSR-16 caching implementations.
- Utility classes to aid in the implementation of other caching backends.
- An extension to the caching standards using a tag-based cache invalidation technique.
- A framework to hook in to and modify the cache values on their way in and out of the pool.

Interested? [Here's how to get started.](#getting-started)

Getting started
---------------

[](#getting-started)

### Installation

[](#installation)

*eufony/cache* is released as a [Packagist](https://packagist.org/) package and can be easily installed via [Composer](https://getcomposer.org/) with:

```
composer require "eufony/cache"

```

### Basic Usage

[](#basic-usage)

*For a more detailed documentation, see [here](docs).*

*eufony/cache* provides three different caching implementations:

```
// An in-memory cache pool using a PHP array.
$cache = new ArrayCache();

// An in-memory cache pool using the `apcu` extension,
// which can share cache values between processes on the same host.
$cache = new ApcuCache();

// A fake cache based on the Null Object Pattern.
$cache = new NullCache();
```

You can extend these cache pools using [marshallers](https://github.com/eufony/marshaller) and a tag-based cache invalidation interface.

It also provides adapter classes to convert between PSR-6 and PSR-16 cache implementations:

```
// Convert from PSR-6 to PSR-16.
$cache = new Psr16Adapter(/* ... */);

// Convert from PSR-16 to PSR-6.
$cache = new Psr6Adapter(/* ... */);
```

Contributing
------------

[](#contributing)

Found a bug or a missing feature? You can report it over at the [issue tracker](https://github.com/eufony/cache/issues).

License
-------

[](#license)

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see .

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

Established project with proven stability

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

Recently: every ~93 days

Total

14

Last Release

826d ago

Major Versions

v0.4.1 → v1.0.02023-02-08

PHP version history (2 changes)v0.1.0PHP ^8.0

v0.3.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/7b73d2ffc86da306523c3c4fb19e002ba203ed2819b14db27d7b510bb58b2c3d?d=identicon)[ahgencer](/maintainers/ahgencer)

---

Top Contributors

[![ahgencer](https://avatars.githubusercontent.com/u/33004442?v=4)](https://github.com/ahgencer "ahgencer (49 commits)")

---

Tags

cacheeufonyphppsr-16psr-6cachepsr-16psr-6eufony

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/eufony-cache/health.svg)

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

###  Alternatives

[laminas/laminas-cache

Caching implementation with a variety of storage options, as well as codified caching strategies for callbacks, classes, and output

1076.9M130](/packages/laminas-laminas-cache)[cache/simple-cache-bridge

A PSR-6 bridge to PSR-16. This will make any PSR-6 cache compatible with SimpleCache.

423.1M27](/packages/cache-simple-cache-bridge)[codeigniter4/cache

PSR-6 and PSR-16 Cache Adapters for CodeIgniter 4

1320.1k](/packages/codeigniter4-cache)

PHPackages © 2026

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