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

ActiveLibrary[Caching](/categories/caching)

lru-runtime-cache/lru-runtime-cache
===================================

The package provides the least recently used runtime cache class.

1.0.0(2y ago)03proprietaryPHPPHP ^7.4|^8.0

Since Nov 22Pushed 2y ago1 watchersCompare

[ Source](https://github.com/dmitrik86/lru-runtime-cache)[ Packagist](https://packagist.org/packages/lru-runtime-cache/lru-runtime-cache)[ RSS](/packages/lru-runtime-cache-lru-runtime-cache/feed)WikiDiscussions master Synced 2w ago

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

LRU Runtime Cache
=================

[](#lru-runtime-cache)

The package provides the least recently used runtime cache class.

How to install
==============

[](#how-to-install)

Add the package

```
composer require lru-runtime-cache/lru-runtime-cache

```

How to use
==========

[](#how-to-use)

Create a class `LRURuntimeCache`

```
use LRURuntimeCache\LRURuntimeCache;

$runtimeCache = new LRURuntimeCache();

```

Constructor has one optional param $maxSize. It is used to set the number of maximum runtime cache items.

Methods
=======

[](#methods)

1. Add item to runtime cache

```
$runtimeCache->set($key, $value);

```

2. Get value from cache

```
$runtimeCache->get($key);

```

3. Check if key exists in runtime cache

```
$runtimeCache->has($key);

```

4. Delete item in cache

```
$runtimeCache->delete($key);

```

Unit tests
==========

[](#unit-tests)

1. Install unit test package

```
composer install --dev

```

2. Run unit tests

```
./vendor/bin/phpunit

```

###  Health Score

21

—

LowBetter than 17% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 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

1000d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13481872?v=4)[dmitrik86](/maintainers/dmitrik86)[@dmitrik86](https://github.com/dmitrik86)

---

Top Contributors

[![dmitrik86](https://avatars.githubusercontent.com/u/13481872?v=4)](https://github.com/dmitrik86 "dmitrik86 (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[iazaran/smart-cache

Smart Cache is a caching optimization package designed to enhance the way your Laravel application handles data caching. It intelligently manages large data sets by compressing, chunking, or applying other optimization strategies to keep your application performant and efficient.

21114.2k](/packages/iazaran-smart-cache)[ichhabrecht/intcache

Turn uncachable page objects into cacheable links

193.9k](/packages/ichhabrecht-intcache)

PHPackages © 2026

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