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 1mo 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 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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

900d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b2f568f6c9c3a48b6d94bab941a92810d5550cd066d154db2ef513b9b1fa943c?d=identicon)[dmitrik86](/maintainers/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

[predis/predis

A flexible and feature-complete Redis/Valkey client for PHP.

7.8k305.7M2.4k](/packages/predis-predis)[snc/redis-bundle

A Redis bundle for Symfony

1.0k39.4M67](/packages/snc-redis-bundle)[react/cache

Async, Promise-based cache interface for ReactPHP

444112.4M40](/packages/react-cache)[wp-media/wp-rocket

Performance optimization plugin for WordPress

7431.3M3](/packages/wp-media-wp-rocket)[illuminate/cache

The Illuminate Cache package.

12835.6M1.4k](/packages/illuminate-cache)[colinmollenhour/php-redis-session-abstract

A Redis-based session handler with optimistic locking

6325.6M14](/packages/colinmollenhour-php-redis-session-abstract)

PHPackages © 2026

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