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

ActiveLibrary[Caching](/categories/caching)

graymatterlabs/simple-cache
===========================

PSR-16 implementations

v1.1.4(3y ago)06.1k[2 PRs](https://github.com/graymatterlabs/simple-cache/pulls)1MITPHPPHP ^8.0

Since Aug 15Pushed 2y ago1 watchersCompare

[ Source](https://github.com/graymatterlabs/simple-cache)[ Packagist](https://packagist.org/packages/graymatterlabs/simple-cache)[ Docs](https://github.com/graymatterlabs/simple-cache)[ RSS](/packages/graymatterlabs-simple-cache/feed)WikiDiscussions master Synced 4w ago

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

PSR-16 Simple Cache Implementations
===================================

[](#psr-16-simple-cache-implementations)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d87ad961f4ee90a80877e04240332db5b167a69bfe7c28817c857582be997d81/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f677261796d61747465726c6162732f73696d706c652d63616368652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/graymatterlabs/simple-cache)[![Tests](https://github.com/graymatterlabs/simple-cache/actions/workflows/run-tests.yml/badge.svg?branch=master)](https://github.com/graymatterlabs/simple-cache/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/74f228e88f00e2b27c87d8d267b2daf4752e5d7bf240b5fe36ad68507ff42a1b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f677261796d61747465726c6162732f73696d706c652d63616368652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/graymatterlabs/simple-cache)

Runtime implementations that satisfy the PSR-16 specification. Currently supported are array, "null-object", and cookie-based implementations.

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

[](#installation)

You can install the package via composer:

```
composer require graymatterlabs/simple-cache:^1.1
```

Usage
-----

[](#usage)

```
$cache = new ArrayCache(); // new CookieCache('cookie-name');

$cache->set($key, $value, $ttl); // bool
$cache->setMultiple($values, $ttl); // bool
$cache->get($key, $default); // $value|$default
$cache->getMultiple($keys, $default); // iterator|$default
$cache->delete($key); // bool
$cache->deleteMultiple($keys); // bool
$cache->has($key); // bool
$cache->clear();
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see the [Release Notes](../../releases) for more information on what has changed recently.

Credits
-------

[](#credits)

- [Ryan Colson](https://github.com/ryancco)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 52% 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 ~39 days

Recently: every ~49 days

Total

6

Last Release

1166d ago

### Community

Maintainers

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

---

Top Contributors

[![ryancco](https://avatars.githubusercontent.com/u/20148569?v=4)](https://github.com/ryancco "ryancco (13 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (6 commits)")

---

Tags

simple-cachepsr-16graymatterlabs

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

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

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

###  Alternatives

[psr/simple-cache

Common interfaces for simple caching

8.1k727.3M2.1k](/packages/psr-simple-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)[sabre/cache

Simple cache abstraction layer implementing PSR-16

541.2M3](/packages/sabre-cache)

PHPackages © 2026

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