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

ActiveLibrary[Caching](/categories/caching)

timurturdyev/laminas-cache
==========================

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

4.0.4(1y ago)08BSD-3-ClausePHP ~8.1.0 || ~8.2.0 || ~8.3.0

Since Dec 31Pushed 1y agoCompare

[ Source](https://github.com/TimurTurdyev/laminas-cache)[ Packagist](https://packagist.org/packages/timurturdyev/laminas-cache)[ Docs](https://laminas.dev)[ RSS](/packages/timurturdyev-laminas-cache/feed)WikiDiscussions 4.1.x Synced 1mo ago

READMEChangelogDependencies (14)Versions (145)Used By (0)

laminas-cache
=============

[](#laminas-cache)

[![Build Status](https://github.com/laminas/laminas-cache/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/laminas/laminas-cache/actions/workflows/continuous-integration.yml)

> ## 🇷🇺 Русским гражданам
>
> [](#-русским-гражданам)
>
> Мы, участники Laminas, родились и живем в разных странах. У многих из нас есть друзья, родственники и коллеги как в России, так и в Украине. Некоторые из нас родились в России. Некоторые из нас живут в России. У некоторых бабушки и дедушки сражались с фашистами во Второй мировой войне. Здесь никто не поддерживает фашизм.
>
> У одного из нас есть украинская родственница, которая спаслась из дома вместе с сыном. Поезд задержался из-за бомбежки на дороге впереди. У нас есть друзья, которые прячутся в бомбоубежищах. Мы с тревогой ждем весточки от них после воздушных налетов, которые беспорядочно наносят удары и попадают по больницам, школам, детским садам и домам. Мы не берем это из каких-либо СМИ. Мы наблюдаем это напрямую.
>
> Вы доверяете нам достаточно, чтоб использовать наши программы, и мы просим вас довериться нам вновь. Мы нуждаемся в помощи. Выходите и протестуйте против этой бесполезной войны. Остановите кровопролитие. Скажите "Нет войне!"
>
> ## 🇺🇸 To Citizens of Russia
>
> [](#-to-citizens-of-russia)
>
> We at Laminas come from all over the world. Many of us have friends, family and colleagues in both Russia and Ukraine. Some of us were born in Russia. Some of us currently live in Russia. Some have grandparents who fought Nazis in World War II. Nobody here supports fascism.
>
> One team member has a Ukrainian relative who fled her home with her son. The train was delayed due to bombing on the road ahead. We have friends who are hiding in bomb shelters. We anxiously follow up on them after the air raids, which indiscriminately fire at hospitals, schools, kindergartens and houses. We're not taking this from any media. These are our actual experiences.
>
> You trust us enough to use our software. We ask that you trust us to say the truth on this. We need your help. Go out and protest this unnecessary war. Stop the bloodshed. Say "stop the war!"

`Laminas\Cache` provides a general cache system for PHP. The `Laminas\Cache` component is able to cache different patterns (class, object, output, etc) using different storage adapters (DB, File, Memcache, etc).

- File issues at
- Documentation is at

Standalone
----------

[](#standalone)

If this component is used without `laminas-mvc` or `mezzio`, a PSR-11 container to fetch services, adapters, plugins, etc. is needed.

The easiest way would be to use [laminas-config-aggregator](https://docs.laminas.dev/laminas-config-aggregator/) along with [laminas-servicemanager](https://docs.laminas.dev/laminas-servicemanager/).

```
use Laminas\Cache\ConfigProvider;
use Laminas\Cache\Service\StorageAdapterFactoryInterface;
use Laminas\Cache\Storage\Adapter\Memory;
use Laminas\ConfigAggregator\ConfigAggregator;
use Laminas\ServiceManager\ServiceManager;

$config = (new ConfigAggregator([
    ConfigProvider::class,
]))->getMergedConfig();

$dependencies = $config['dependencies'];

$container = new ServiceManager($dependencies);

/** @var StorageAdapterFactoryInterface $storageFactory */
$storageFactory = $container->get(StorageAdapterFactoryInterface::class);

$storage = $storageFactory->create(Memory::class);

$storage->setItem('foo', 'bar');
```

Benchmarks
----------

[](#benchmarks)

We provide scripts for benchmarking laminas-cache using the [PHPBench](https://github.com/phpbench/phpbench) framework; these can be found in the `benchmark/` directory of each storage adapter.

To execute the benchmarks you can run the following command:

```
$ vendor/bin/phpbench run --report=aggregate
```

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity90

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 63.1% 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 ~12 days

Recently: every ~21 days

Total

139

Last Release

609d ago

Major Versions

2.13.2 → 3.0.02021-11-13

3.12.2 → 4.0.02024-06-15

PHP version history (13 changes)2.0.0PHP &gt;=5.3.3

2.3.0PHP &gt;=5.3.23

2.5.2PHP &gt;=5.5

2.6.0PHP ^5.5 || ^7.0

2.8.0PHP ^5.6 || ^7.0

2.11.0PHP ^7.3 || ~8.0.0

3.0.0PHP ^7.3 || ~8.0.0 || ~8.1.0

3.2.0PHP ^7.4 || ~8.0.0 || ~8.1.0

3.4.0PHP ~7.4.0 || ~8.0.0 || ~8.1.0

3.7.0PHP ~8.0.0 || ~8.1.0 || ~8.2.0

3.11.x-devPHP ~8.1.0 || ~8.2.0

3.12.0PHP ~8.1.0 || ~8.2.0 || ~8.3.0

3.13.x-devPHP ~8.1.0 || ~8.2.0 || ^8.3.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/280b69988c47ccbc8d6f34e3b9a369e11e4a859a4de6e6cfb6510be2ddc55375?d=identicon)[TimurTurdyev](/maintainers/TimurTurdyev)

---

Top Contributors

[![weierophinney](https://avatars.githubusercontent.com/u/25943?v=4)](https://github.com/weierophinney "weierophinney (4833 commits)")[![Maks3w](https://avatars.githubusercontent.com/u/1301698?v=4)](https://github.com/Maks3w "Maks3w (619 commits)")[![marc-mabe](https://avatars.githubusercontent.com/u/302689?v=4)](https://github.com/marc-mabe "marc-mabe (458 commits)")[![boesing](https://avatars.githubusercontent.com/u/2189546?v=4)](https://github.com/boesing "boesing (438 commits)")[![Ocramius](https://avatars.githubusercontent.com/u/154256?v=4)](https://github.com/Ocramius "Ocramius (419 commits)")[![EvanDotPro](https://avatars.githubusercontent.com/u/5607?v=4)](https://github.com/EvanDotPro "EvanDotPro (157 commits)")[![akrabat](https://avatars.githubusercontent.com/u/33135?v=4)](https://github.com/akrabat "akrabat (127 commits)")[![ezimuel](https://avatars.githubusercontent.com/u/475967?v=4)](https://github.com/ezimuel "ezimuel (114 commits)")[![michalbundyra](https://avatars.githubusercontent.com/u/7423207?v=4)](https://github.com/michalbundyra "michalbundyra (84 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (51 commits)")[![samsonasik](https://avatars.githubusercontent.com/u/459648?v=4)](https://github.com/samsonasik "samsonasik (44 commits)")[![ralphschindler](https://avatars.githubusercontent.com/u/76674?v=4)](https://github.com/ralphschindler "ralphschindler (36 commits)")[![sgehrig](https://avatars.githubusercontent.com/u/43394?v=4)](https://github.com/sgehrig "sgehrig (33 commits)")[![DASPRiD](https://avatars.githubusercontent.com/u/233300?v=4)](https://github.com/DASPRiD "DASPRiD (28 commits)")[![Freeaqingme](https://avatars.githubusercontent.com/u/33034?v=4)](https://github.com/Freeaqingme "Freeaqingme (24 commits)")[![froschdesign](https://avatars.githubusercontent.com/u/103362?v=4)](https://github.com/froschdesign "froschdesign (21 commits)")[![mwillbanks](https://avatars.githubusercontent.com/u/38209?v=4)](https://github.com/mwillbanks "mwillbanks (18 commits)")[![thomasvargiu](https://avatars.githubusercontent.com/u/732012?v=4)](https://github.com/thomasvargiu "thomasvargiu (18 commits)")[![Thinkscape](https://avatars.githubusercontent.com/u/270528?v=4)](https://github.com/Thinkscape "Thinkscape (15 commits)")[![stefanotorresi](https://avatars.githubusercontent.com/u/2952427?v=4)](https://github.com/stefanotorresi "stefanotorresi (15 commits)")

---

Tags

laminascachepsr-16psr-6

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/timurturdyev-laminas-cache/health.svg)](https://phpackages.com/packages/timurturdyev-laminas-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)
