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

ActiveLibrary[Caching](/categories/caching)

koriym/mini-cache
=================

Simplest cache with no expiration

1.x-dev(2mo ago)2113[1 issues](https://github.com/koriym/Koriym.MiniCache/issues)MITPHPPHP ^8.0CI passing

Since Feb 24Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/koriym/Koriym.MiniCache)[ Packagist](https://packagist.org/packages/koriym/mini-cache)[ RSS](/packages/koriym-mini-cache/feed)WikiDiscussions 1.x Synced 1mo ago

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

koriym/mini-cache
=================

[](#koriymmini-cache)

- No Expiration
- String Only
- Fast

This is the simplest cache available, as no TTL can be specified and only strings can be stored.

It is suitable for storing strings that, once deployed, are unchanged and computationally expensive, such as parsing phpdocs or retrieving unchanged network files.

Want to store non-string data? You can perform the serialization. Be sure to specify the `allowed_classes` option when saving objects for safe unseiralize.

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

[](#installation)

```
composer require koriym/mini-cache

```

Usage
-----

[](#usage)

```
$cache = new MiniCache(__DIR__ . '/tmp');
$expensiveComputation = fn() => '1';
$cachedResult = $cache->get('foo', $expensiveComputation);

assert($cachedResult === '1');
```

[PSR 16](https://www.php-fig.org/psr/psr-16/) and [symfony/cache-contracts](https://github.com/symfony/cache-contracts) adapters are also available.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance75

Regular maintenance activity

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity25

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

75d ago

### Community

Maintainers

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

---

Top Contributors

[![koriym](https://avatars.githubusercontent.com/u/529021?v=4)](https://github.com/koriym "koriym (31 commits)")

---

Tags

cache

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[psr/simple-cache

Common interfaces for simple caching

8.1k727.3M2.1k](/packages/psr-simple-cache)[psr/cache

Common interface for caching libraries

5.2k686.9M1.3k](/packages/psr-cache)[react/cache

Async, Promise-based cache interface for ReactPHP

444112.4M40](/packages/react-cache)[beste/in-memory-cache

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

2512.2M6](/packages/beste-in-memory-cache)[anahkiasen/flatten

A package for the Illuminate framework that flattens pages to plain HTML

33313.0k](/packages/anahkiasen-flatten)[rtcamp/nginx-helper

Cleans nginx's fastcgi/proxy cache or redis-cache whenever a post is edited/published. Also provides cloudflare edge cache purging with Cache-Tags.

23817.0k1](/packages/rtcamp-nginx-helper)

PHPackages © 2026

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