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

ActiveLibrary[Caching](/categories/caching)

cache/util
==========

PSR-6 and PSR-16 Caching Utilities

0.2.0(4y ago)29.3kMITPHPPHP &gt;=7.4CI failing

Since Dec 7Pushed 4y ago3 watchersCompare

[ Source](https://github.com/php-cache/Util)[ Packagist](https://packagist.org/packages/cache/util)[ Docs](http://www.php-cache.com/en/latest/)[ RSS](/packages/cache-util/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

Cache Utilities
===============

[](#cache-utilities)

[![Gitter](https://camo.githubusercontent.com/2ded3ed1778dcfc9af5e2dfaad55e176ade49082cb6ea757169cc5ea23bf32ac/68747470733a2f2f6261646765732e6769747465722e696d2f7068702d63616368652f63616368652e737667)](https://gitter.im/php-cache/cache?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)[![Latest Stable Version](https://camo.githubusercontent.com/6c1bb5afa90994640f89e3b71cbfa7e531e5d88c0adc25a28998583ee7ee938e/68747470733a2f2f706f7365722e707567782e6f72672f63616368652f7574696c2f762f737461626c65)](https://packagist.org/packages/cache/util)[![codecov.io](https://camo.githubusercontent.com/985fd0c168cce9372a8f7d48942906eb890cea549d3c0e11ecfdcbe10f09cbba/68747470733a2f2f636f6465636f762e696f2f6769746875622f7068702d63616368652f7574696c2f636f7665726167652e7376673f6272616e63683d6d6173746572)](https://codecov.io/github/php-cache/util?branch=master)[![Total Downloads](https://camo.githubusercontent.com/9b248763696265262436da5a8d0e2a30925b28df9bf9ad3645d90dd801615495/68747470733a2f2f706f7365722e707567782e6f72672f63616368652f7574696c2f646f776e6c6f616473)](https://packagist.org/packages/cache/util)[![Monthly Downloads](https://camo.githubusercontent.com/df741ba2bec2cb0d4e6c92e7938c5fe225e37b1c09f6a55e3ce1c5c31fab1426/68747470733a2f2f706f7365722e707567782e6f72672f63616368652f7574696c2f642f6d6f6e74686c792e706e67)](https://packagist.org/packages/cache/util)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

This is a collection of utilities for the PSR-16 and PSR-6 caching standards.

### Install

[](#install)

```
composer require cache/util
```

### Use

[](#use)

```
use function Cache\Util\SimpleCache\remember;

$cache = new SimpleCache(); // some simple cache interface

// if the result exists at the key, it'll return from cache, else it'll execute the callback and store in cache and return.
$res = remember($cache, 'key', 3600, function() {
    return someExpensiveOperation();
});
```

### Contribute

[](#contribute)

Contributions are very welcome! Send a pull request to the [main repository](https://github.com/php-cache/cache) or report any issues you find on the [issue tracker](http://issues.php-cache.com).

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

Total

2

Last Release

1583d ago

PHP version history (2 changes)0.1.0PHP ^5.6 || ^7.0 || ^8.0

0.2.0PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/401ccc5eea13c60cf807ae982af00e368e2166e2f26d8eb541dcd881a57385bc?d=identicon)[Nyholm](/maintainers/Nyholm)

---

Top Contributors

[![Nyholm](https://avatars.githubusercontent.com/u/1275206?v=4)](https://github.com/Nyholm "Nyholm (5 commits)")[![ruudk](https://avatars.githubusercontent.com/u/104180?v=4)](https://github.com/ruudk "ruudk (4 commits)")[![prisis](https://avatars.githubusercontent.com/u/2716058?v=4)](https://github.com/prisis "prisis (1 commits)")[![ragboyjr](https://avatars.githubusercontent.com/u/1975857?v=4)](https://github.com/ragboyjr "ragboyjr (1 commits)")

---

Tags

cachepsr6utilutilitiespsr16

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[symfony/cache

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

4.2k348.9M2.5k](/packages/symfony-cache)[tedivm/stash

The place to keep your cache.

9824.8M124](/packages/tedivm-stash)[cache/tag-interop

Framework interoperable interfaces for tags

10525.0M12](/packages/cache-tag-interop)[cache/cache

Library of all the php-cache adapters

2712.7M22](/packages/cache-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/taggable-cache

Add tag support to your PSR-6 cache implementation

352.4M12](/packages/cache-taggable-cache)

PHPackages © 2026

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