PHPackages                             stepanrodionov/php-apcu-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. stepanrodionov/php-apcu-cache

ActiveLibrary[Caching](/categories/caching)

stepanrodionov/php-apcu-cache
=============================

This is PSR-16 compatible cache library using php-apcu module

2.0.3(7y ago)515.3k[1 issues](https://github.com/StepanRodionov/php-apcu-cache/issues)MITPHPPHP ^7.0

Since Jan 6Pushed 7y ago2 watchersCompare

[ Source](https://github.com/StepanRodionov/php-apcu-cache)[ Packagist](https://packagist.org/packages/stepanrodionov/php-apcu-cache)[ RSS](/packages/stepanrodionov-php-apcu-cache/feed)WikiDiscussions master Synced 3w ago

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

[![Latest Stable Version](https://camo.githubusercontent.com/d6a6708f252c3ab9f8be8370cb32f73dac3f90aef389d4b83e8bf2a06a7fb5c1/68747470733a2f2f706f7365722e707567782e6f72672f73746570616e726f64696f6e6f762f7068702d617063752d63616368652f76657273696f6e)](https://packagist.org/packages/stepanrodionov/php-apcu-cache)[![Latest Unstable Version](https://camo.githubusercontent.com/dc508163ea8d4d62659ba7c3ab759dcb5cb79691a72f3f4fff55cbe567e5081f/68747470733a2f2f706f7365722e707567782e6f72672f73746570616e726f64696f6e6f762f7068702d617063752d63616368652f762f756e737461626c65)](//packagist.org/packages/stepanrodionov/php-apcu-cache)[![License](https://camo.githubusercontent.com/b8dd9e75242a0850564ac5d4c423c29742435941d91833f82e5f70251eb32350/68747470733a2f2f706f7365722e707567782e6f72672f73746570616e726f64696f6e6f762f7068702d617063752d63616368652f6c6963656e7365)](https://packagist.org/packages/stepanrodionov/php-apcu-cache)[![Codacy Badge](https://camo.githubusercontent.com/11ae393bb79244cd0250aab234069215ae899c786aa913e48c38b0633b0ca866/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f3239343233303035613731323462636638373832656236323534393239643633)](https://www.codacy.com/app/pandmitr/php-apcu-cache?utm_source=github.com&utm_medium=referral&utm_content=StepanRodionov/php-apcu-cache&utm_campaign=Badge_Grade)

php-apcu-cache (PSR-16)
=======================

[](#php-apcu-cache-psr-16)

This is [PSR-16](https://www.php-fig.org/psr/psr-16/) compatible cache library using php-apcu module. It's provides one class ApcuCacheStorage which implements `Psr\SimpleCache\CacheInterface` and may be used in your code everywhere, where php cache is need.

About apcu
----------

[](#about-apcu)

Php-apcu provides in-memory cache, which stores variables between requests. You can read more about it in [this page](http://php.net/manual/en/ref.apcu.php).

Usage
-----

[](#usage)

You should create instance of ApcuCacheStorage and when you'll get access to its functionality

```
$cache = new SR\Cache\ApcuCacheStorage();

//  store variable with ttl
$success = $cache->set('key', $variable, 3600);

//  get variable
$variable = $cache->get('key');

//  'key' will be overwritten
$cache->set('key', $anotherVar, 3600);

//  deleting one cached variable and all of them
$cache->delete('key');
$cache->clear();

// dealing with multiple data
$cache->getMultiple([
    'key',
    'key1',
]);
$cache->setMultiple([
    'key' => 'value',
    'key1' => 'value1',
]);
$cache->deleteMultiple([
    'key',
    'key1',
]);

//  check if variable exists
$isVarCached = $cache->has('key');
```

Tests
-----

[](#tests)

Run `composer test`.

License
-------

[](#license)

This component is under the MIT license. See the complete license in the [LICENSE](./LICENSE) file.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 64.3% 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 ~2 days

Total

7

Last Release

2713d ago

Major Versions

0.1.0 → 1.0.02019-01-12

1.0.0 → 2.0.02019-01-15

### Community

Maintainers

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

---

Top Contributors

[![StepanRodionov](https://avatars.githubusercontent.com/u/19999922?v=4)](https://github.com/StepanRodionov "StepanRodionov (9 commits)")[![pandmitr](https://avatars.githubusercontent.com/u/6427560?v=4)](https://github.com/pandmitr "pandmitr (5 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/stepanrodionov-php-apcu-cache/health.svg)

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

###  Alternatives

[moonshine/moonshine

Laravel administration panel

1.3k239.9k75](/packages/moonshine-moonshine)[laminas/laminas-cache

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

1067.2M145](/packages/laminas-laminas-cache)[sabre/cache

Simple cache abstraction layer implementing PSR-16

551.3M4](/packages/sabre-cache)[voku/simple-cache

Simple Cache library

322.6M9](/packages/voku-simple-cache)[graham-campbell/bounded-cache

A Bounded TTL PSR-16 Cache Implementation

112.1M10](/packages/graham-campbell-bounded-cache)[neos/cache

Neos Cache Framework

102.1M36](/packages/neos-cache)

PHPackages © 2026

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