PHPackages                             cjrasmussen/data-cache-handler - 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. cjrasmussen/data-cache-handler

ActiveLibrary[Caching](/categories/caching)

cjrasmussen/data-cache-handler
==============================

Simple helper for caching data

1.1.0(1y ago)07MITPHPPHP &gt;=7.4.0

Since Jun 10Pushed 1y agoCompare

[ Source](https://github.com/cjrasmussen/DataCacheHandler)[ Packagist](https://packagist.org/packages/cjrasmussen/data-cache-handler)[ RSS](/packages/cjrasmussen-data-cache-handler/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (3)Used By (0)

DataCacheHandler
================

[](#datacachehandler)

I've got a handful of scripts that function as notifiers. They run on a schedule and consume RSS feeds or API endpoints or scrape web pages. Then they compare the data retrieved with what was last retrieved and notify me of any changes.

To do that, they need a way of caching whatever "last retrieved" was. This is a simple helper class for doing that. It works for string data and anything that can be JSON encoded/decoded or serialized/unserialized.

Usage
-----

[](#usage)

```
use cjrasmussen\DataCacheHandler\DataCacheHandler;

$dataCacheHelper = new DataCacheHandler('/home/cjrasmussen/scripts/.cache/');

$dataCacheHelper->initialize(__FILE__);

$cache = $dataCache->readSerialized();

$cache[] = 'Some new item to cache';

$dataCacheHelper->writeSerialized();
```

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

[](#installation)

Simply add a dependency on cjrasmussen/DataCacheHandler to your composer.json file if you use [Composer](https://getcomposer.org/) to manage the dependencies of your project:

```
composer require cjrasmussen/DataCacheHandler
```

Although it's recommended to use Composer, you can actually include the file(s) any way you want.

License
-------

[](#license)

DataCacheHandler is [MIT](http://opensource.org/licenses/MIT) licensed.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance45

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 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

433d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0225f44837a665c8a143afa50a34a406a769c523dba31e4cdf73fd0530dede45?d=identicon)[cjrasmussen](/maintainers/cjrasmussen)

---

Top Contributors

[![cjrasmussen](https://avatars.githubusercontent.com/u/15007730?v=4)](https://github.com/cjrasmussen "cjrasmussen (2 commits)")

### Embed Badge

![Health badge](/badges/cjrasmussen-data-cache-handler/health.svg)

```
[![Health](https://phpackages.com/badges/cjrasmussen-data-cache-handler/health.svg)](https://phpackages.com/packages/cjrasmussen-data-cache-handler)
```

###  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)[phpfastcache/phpssdb

PHP SSDB Driver for phpFastCache

14736.9k1](/packages/phpfastcache-phpssdb)[rapidwebltd/rw-file-cache

RW File Cache is a PHP File-based Caching Library. Its syntax is designed to closely resemble the PHP memcache extension.

15196.8k7](/packages/rapidwebltd-rw-file-cache)[yuzuru-s/redis-recommend

Wrapping Redis's sorted set APIs for specializing recommending operations.

392.9k](/packages/yuzuru-s-redis-recommend)[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)
