PHPackages                             timacdonald/cached-valuestore - 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. timacdonald/cached-valuestore

ActiveUtility[Caching](/categories/caching)

timacdonald/cached-valuestore
=============================

An extension of spatie/valuestore with in-memory caching.

v2.0.2(4y ago)117172[2 PRs](https://github.com/timacdonald/cached-valuestore/pulls)MITPHPPHP ^7.0 || ^8.0

Since Feb 25Pushed 1y ago1 watchersCompare

[ Source](https://github.com/timacdonald/cached-valuestore)[ Packagist](https://packagist.org/packages/timacdonald/cached-valuestore)[ RSS](/packages/timacdonald-cached-valuestore/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (4)Dependencies (2)Versions (7)Used By (0)

Cached Valuestore
=================

[](#cached-valuestore)

[![Latest Stable Version](https://camo.githubusercontent.com/2e3a2baab438a288966ab4653e79f30d8ea011396688baad0876c7f6cb45deab/68747470733a2f2f706f7365722e707567782e6f72672f74696d6163646f6e616c642f6361636865642d76616c756573746f72652f762f737461626c65)](https://packagist.org/packages/timacdonald/cached-valuestore) [![Total Downloads](https://camo.githubusercontent.com/f9fad1875193f7970d63c5a2c7634a4044b02f73e0ccb86255eafdec1737c8dd/68747470733a2f2f706f7365722e707567782e6f72672f74696d6163646f6e616c642f6361636865642d76616c756573746f72652f646f776e6c6f616473)](https://packagist.org/packages/timacdonald/cached-valuestore) [![License](https://camo.githubusercontent.com/fc6a34689cac0db821557f7f5c39b9eb86b647b87d69904949ca76cede928dd6/68747470733a2f2f706f7365722e707567782e6f72672f74696d6163646f6e616c642f6361636865642d76616c756573746f72652f6c6963656e7365)](https://packagist.org/packages/timacdonald/cached-valuestore)

This is an extension of [`spatie/valuestore`](https://github.com/spatie/valuestore) that introduces a local cache in the class. Thanks to Spatie for providing such a great package ecosystem. This is an under appreciated awesome package IMO.

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

[](#installation)

You can install using [composer](https://getcomposer.org/) from [Packagist](https://packagist.org/packages/timacdonald/cached-valuestore)

```
$ composer require timacdonald/cached-valuestore

```

Usage
-----

[](#usage)

Please refer to the [original package docs](https://github.com/spatie/valuestore) for general usage. The only new method is the ability to clear the cache - however this is done when persisting so you probably won't ever need it.

```
$valuestore->clearCache();
```

Thanksware
----------

[](#thanksware)

You are free to use this package, but I ask that you reach out to someone (not me) who has previously, or is currently, maintaining or contributing to an open source library you are using in your project and thank them for their work. Consider your entire tech stack: packages, frameworks, languages, databases, operating systems, frontend, backend, etc.

Upgrade v1 &gt; v2
------------------

[](#upgrade-v1--v2)

- The cache is now an instance variable rather than a static variable.
- Any calls to `Valuestore::clearCache();` need to be replaced with `$valuestore->clearCache();`.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 86.7% 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 ~486 days

Total

4

Last Release

1582d ago

Major Versions

v1.0.0 → v2.0.02018-11-19

PHP version history (3 changes)v1.0.0PHP ^7.0

v2.0.1PHP ^7.0|^8.0

v2.0.2PHP ^7.0 || ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/24803032?v=4)[Tim MacDonald](/maintainers/timacdonald)[@timacdonald](https://github.com/timacdonald)

---

Top Contributors

[![timacdonald](https://avatars.githubusercontent.com/u/24803032?v=4)](https://github.com/timacdonald "timacdonald (13 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")[![forxer](https://avatars.githubusercontent.com/u/407917?v=4)](https://github.com/forxer "forxer (1 commits)")

---

Tags

cachevaluestore

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/timacdonald-cached-valuestore/health.svg)

```
[![Health](https://phpackages.com/badges/timacdonald-cached-valuestore/health.svg)](https://phpackages.com/packages/timacdonald-cached-valuestore)
```

###  Alternatives

[psr/simple-cache

Common interfaces for simple caching

8.1k757.1M2.6k](/packages/psr-simple-cache)[psr/cache

Common interface for caching libraries

5.2k712.8M1.6k](/packages/psr-cache)[react/cache

Async, Promise-based cache interface for ReactPHP

445124.5M44](/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.

2514.6M10](/packages/beste-in-memory-cache)[fastd/fastd

A High Performance API Framework By Swoole Extension

42015.4k18](/packages/fastd-fastd)[anahkiasen/flatten

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

33113.0k](/packages/anahkiasen-flatten)

PHPackages © 2026

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