PHPackages                             brnc/cache-psr16-adapter - 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. brnc/cache-psr16-adapter

ActiveLibrary[Caching](/categories/caching)

brnc/cache-psr16-adapter
========================

Provides a PSR-6 cache from a given PSR-16 instance.

v1.1.0(4y ago)111MITPHPPHP ^7.4 || ^8.0

Since Oct 10Pushed 4y ago1 watchersCompare

[ Source](https://github.com/ebln/cache-psr16-adapter)[ Packagist](https://packagist.org/packages/brnc/cache-psr16-adapter)[ RSS](/packages/brnc-cache-psr16-adapter/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (9)Versions (3)Used By (0)

PSR-6 cache implementation adapting PSR-16
==========================================

[](#psr-6-cache-implementation-adapting-psr-16)

This package provides a PSR-6 cache instance when you only have a PSR-16 cache at hand. As PSR-6 is more feature-rich than PSR-16, this adaption is not utterly performant. And you should use it very carefully.

A suitable use-case might be that you already went with the leaner PSR-16 in your project but now want to add a third-party package that only supports PSR-6. It should be fine if that package uses the cache only at initialization, e.g. for schema caching. If, however, there is excessive or highly interactive caching traffic, you should consider refactoring your project towards PSR-6.

Usage
-----

[](#usage)

```
    $psr16 = new \Psr\SimpleCache\CacheInterface();
    $psr6  = new \Brnc\CachePsr16Adapter\CacheItemPool($psr16);
```

The constructor takes an optional second argument for a `NowFactory` to enable testing and mocking. Once PSR-20 (Clock) is accepted, the second argument and the `NowFactory` get refactored towards this interface!

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

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

Total

2

Last Release

1668d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6bdf93c597dcd812240fd8be0297584485372b2c73e6c6fb3d6001373e4d6e17?d=identicon)[brnc](/maintainers/brnc)

---

Top Contributors

[![ebln](https://avatars.githubusercontent.com/u/34722048?v=4)](https://github.com/ebln "ebln (32 commits)")

---

Tags

cachephppsr-16psr-6

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/brnc-cache-psr16-adapter/health.svg)

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

###  Alternatives

[symfony/cache

Provides extended PSR-6, PSR-16 (and tags) implementations

4.2k348.9M2.5k](/packages/symfony-cache)[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/adapter-common

Common classes for PSR-6 adapters

11124.4M38](/packages/cache-adapter-common)[cache/cache

Library of all the php-cache adapters

2712.7M22](/packages/cache-cache)[cache/filesystem-adapter

A PSR-6 cache implementation using filesystem. This implementation supports tags

705.8M82](/packages/cache-filesystem-adapter)[cache/array-adapter

A PSR-6 cache implementation using a php array. This implementation supports tags

548.3M151](/packages/cache-array-adapter)

PHPackages © 2026

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