PHPackages                             christopher-paul-shaw/datacache - 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. christopher-paul-shaw/datacache

ActiveLibrary

christopher-paul-shaw/datacache
===============================

Cache Data To Disk

0.0.2(7y ago)044PHPPHP ^5.4 || ^7.0

Since Feb 16Pushed 7y agoCompare

[ Source](https://github.com/christopher-paul-shaw/DataCache)[ Packagist](https://packagist.org/packages/christopher-paul-shaw/datacache)[ RSS](/packages/christopher-paul-shaw-datacache/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Summary
=======

[](#summary)

A PHP Class to cache frequently accessed Data to a file.

This is intended to be used to cache larger datasets such as database reports to prevent repetative and time / resource consuming data queries.

Usage
=====

[](#usage)

```
$file = "my-cache-file"; // File to Use for Cache
$time = "300"; // Seconds to Cache For

$cache = new DataCache($file, $time);
$data = $cache->read();

// Output Cached Version if present
if ($data) {
    die($data);
}

// Write to Cache and Output of not present
$data = rand(1,15);
$cache->write($data);
die($data);

```

###  Health Score

22

—

LowBetter than 23% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

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 ~0 days

Total

2

Last Release

2638d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8bafba22afd8eaab18fa018a05f6d8082881138b6fd434615047ca07b1620a79?d=identicon)[chris-shaw](/maintainers/chris-shaw)

---

Top Contributors

[![christopher-paul-shaw](https://avatars.githubusercontent.com/u/12035126?v=4)](https://github.com/christopher-paul-shaw "christopher-paul-shaw (15 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/christopher-paul-shaw-datacache/health.svg)

```
[![Health](https://phpackages.com/badges/christopher-paul-shaw-datacache/health.svg)](https://phpackages.com/packages/christopher-paul-shaw-datacache)
```

PHPackages © 2026

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