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

ActiveLibrary[Caching](/categories/caching)

ko/json-cache
=============

A caching module for storing data in a JSON file

0.0.6(8y ago)11101MITPHP

Since Feb 1Pushed 8y ago1 watchersCompare

[ Source](https://github.com/peledies/ko-json-cache)[ Packagist](https://packagist.org/packages/ko/json-cache)[ RSS](/packages/ko-json-cache/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (7)Used By (1)

json-cache
==========

[](#json-cache)

This module is built for caching responses from API's in a file. Its primary focus is on alleviating pressure from an API when data is not required to be up to the second. This is particularly useful when the API may have throttling or rate limiting in use.

Install
-------

[](#install)

```
composer require ko/json-cache
```

Properties
----------

[](#properties)

PropertyTypeDescriptionvalidityIntegerNumber of minutes the cache will be used before being declared invalid \[ Default 15 \]fileStringThe path of the json cache file \[ Default json-cache.json \]Usage
-----

[](#usage)

Build the cache settings object

```
  $KOCacheSettings = new \KO\Cache\Settings();
  $KOCacheSettings->setValidity(15);
  $KOCacheSettings->setFile('data_cache.json');
```

Instantiate a new cache object with the settings

```
  $KOCache = new \KO\Cache\Cache($KOCacheSettings);
```

Documentation
-------------

[](#documentation)

See the full [Documentation](http://ko.karnsonline.com/json-cache) for more details.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

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

Every ~12 days

Total

6

Last Release

2961d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7173f0646b0cdebf4cf99d9282707c85e92ffc1a5d06247de8cefaba619fcb8c?d=identicon)[peledies](/maintainers/peledies)

---

Top Contributors

[![peledies](https://avatars.githubusercontent.com/u/1185267?v=4)](https://github.com/peledies "peledies (10 commits)")

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/ko-json-cache/health.svg)](https://phpackages.com/packages/ko-json-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)
