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

ActiveLibrary[Caching](/categories/caching)

seeren/cache
============

Manage pool cache items

2.0(4y ago)0136MITPHPPHP &gt;=8.0.1CI failing

Since Oct 29Pushed 4y agoCompare

[ Source](https://github.com/seeren/cache)[ Packagist](https://packagist.org/packages/seeren/cache)[ RSS](/packages/seeren-cache/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (4)Versions (12)Used By (0)

Seeren\\Cache
=============

[](#seerencache)

[![Build](https://camo.githubusercontent.com/8ad8681b1597bb67b7bb59add95f0afb46c60d1a3bf7a2a2ac268bafbf82b45b/68747470733a2f2f6170702e7472617669732d63692e636f6d2f73656572656e2f687474702e7376673f6272616e63683d6d6173746572)](https://app.travis-ci.com/seeren/cache)[![Require](https://camo.githubusercontent.com/ef5345b8d83ef6c582b77c7ba54666c4700d5789937dd24ce0a93d1d3ebb5faa/68747470733a2f2f706f7365722e707567782e6f72672f73656572656e2f63616368652f726571756972652f706870)](https://packagist.org/packages/seeren/cache)[![Coverage](https://camo.githubusercontent.com/438dfa164d3a12185bed1c66cbbc900624e08718628934798dc58aa86a130814/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f73656572656e2f6572726f722f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/seeren/cache?branch=master)[![Download](https://camo.githubusercontent.com/bfabbad48b8c53f8694c6d148e64d6660b9cb1007429820cf1fc102206fc3dec/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73656572656e2f63616368652e737667)](https://packagist.org/packages/seeren/cache/stats)[![Codacy Badge](https://camo.githubusercontent.com/fe3f67ea2afe5fd050f2645c93dcead03cde9fd5cb10b557c2f2cc9513c58556/68747470733a2f2f6170702e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f3964346532643463393939313463353639643662366131396238666234663164)](https://www.codacy.com/gh/seeren/cache/dashboard?utm_source=github.com&utm_medium=referral&utm_content=seeren/cache&utm_campaign=Badge_Grade)[![Version](https://camo.githubusercontent.com/7f45ef60b6f727fbe03575b112349e9a4509559e71d6c8fb8e83d67c823678cd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73656572656e2f63616368652e737667)](https://packagist.org/packages/seeren/cache)

Cache items in pool

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

[](#installation)

Seeren\\Cache is a [PSR-6 cache interfaces](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-6-cache.md) implementation

```
composer require seeren/cache
```

---

Seeren\\Cache\\StreamCacheItemPool
----------------------------------

[](#seerencachestreamcacheitempool)

Store item in stream pool

```
use Seeren\Cache\Pool\StreamCacheItemPool;

$pool = new StreamCacheItemPool();

$item = $pool
    ->getItem('foo')
    ->expiresAfter(5);

if (!$item->isHit()) {
    $item->set("item data");
    $pool->save();
}

$data = $item->get();
```

By default, cache folder is in /var/cache

```
project/
└─ var/
   └─ log/
```

---

Seeren\\Cache\\CacheItem
------------------------

[](#seerencachecacheitem)

Use item for manage `Last-Modified` with the extra method `last`

```
$response = $response
    ->withHeader("ETag", $eTag)
    ->withHeader("Last-Modified", $item->last())
    ->withHeader("Cache-Control", "public, max-age=" . $timeToLive)
    ->withHeader("Expires", $item->last(true));
```

> Passing true at `last` add the timeToLive to the lastSave timestamp

---

License
-------

[](#license)

This project is licensed under the [MIT](./LICENSE) License

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity75

Established project with proven stability

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

Recently: every ~432 days

Total

11

Last Release

1636d ago

Major Versions

1.3 → 2.02022-01-07

PHP version history (4 changes)v1.0.1PHP &gt;=7.0.1

v1.2.2PHP &gt;=7.2.0

1.3PHP &gt;=7.4.0

2.0PHP &gt;=8.0.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/17710028?v=4)[Cyril Ichti](/maintainers/seeren)[@seeren](https://github.com/seeren)

---

Top Contributors

[![seeren](https://avatars.githubusercontent.com/u/17710028?v=4)](https://github.com/seeren "seeren (99 commits)")

---

Tags

cacheitemspoolpsr-6cachepsr-6poolitem

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[symfony/cache

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

4.2k373.5M3.2k](/packages/symfony-cache)[tedivm/stash

The place to keep your cache.

9614.9M127](/packages/tedivm-stash)[laminas/laminas-cache

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

1077.3M152](/packages/laminas-laminas-cache)[cache/adapter-common

Common classes for PSR-6 adapters

11125.4M38](/packages/cache-adapter-common)[beste/in-memory-cache

A PSR-6 In-Memory cache that can be used as a fallback implementation and/or in tests.

2515.9M12](/packages/beste-in-memory-cache)[cache/hierarchical-cache

A helper trait and interface to your PSR-6 cache to support hierarchical keys.

6016.6M11](/packages/cache-hierarchical-cache)

PHPackages © 2026

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