PHPackages                             fredbradley/cacher - 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. fredbradley/cacher

AbandonedArchivedLibrary[Caching](/categories/caching)

fredbradley/cacher
==================

A Multiframework compatible Cache interface.

v3.0.0(4y ago)113511MITPHPPHP ^8.0CI failing

Since Jul 10Pushed 4y ago2 watchersCompare

[ Source](https://github.com/fredbradley/cacher)[ Packagist](https://packagist.org/packages/fredbradley/cacher)[ RSS](/packages/fredbradley-cacher/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (3)Versions (28)Used By (1)

Multi Framework Cacher Script
=============================

[](#multi-framework-cacher-script)

[![Latest Version on Packagist](https://camo.githubusercontent.com/22f876bada1c2039dcc18cf7bf2dfd03f823ab872ba7e81f89d909aba6854c0f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f66726564627261646c65792f6361636865722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/fredbradley/cacher)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![StyleCI Status](https://camo.githubusercontent.com/18bd088c58a48c726fef9627e44ece9620a34455c5adfcb2647cc947bda40811/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3237383538343336362f736869656c64)](https://camo.githubusercontent.com/18bd088c58a48c726fef9627e44ece9620a34455c5adfcb2647cc947bda40811/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3237383538343336362f736869656c64)[![Total Downloads](https://camo.githubusercontent.com/bfe5f1ac29a0fd25663af8cac41295f24bed7a1570dbf56fa7457f6207f305a5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f66726564627261646c65792f6361636865722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/fredbradley/cacher)

In my day job, I work regularly with both Laravel and WordPress. I also make packages that are needed to be compatible with both. It becomes a right pain, when it comes to caching, to write out if statements for each framework. So I created this small script which does that for me.

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

[](#installation)

You can install the package via composer:

```
composer require fredbradley/cacher
```

Usage
-----

[](#usage)

```
use FredBradley\Cacher;

Cacher::remember('cache_key_name', 300, function() {
    // Your logic
    $value = "value";
    return $value;
});

/*
 * Will set the value of 'cache_key_name' to the return value of the Closure callback and
 * save in the cache for 5 minutes (300 seconds)
 */
```

There's only a small handful of methods in the one class. It's really basic, but amazingly wonderful!

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Fred Bradley](https://github.com/fredbradley)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity71

Established project with proven stability

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

Recently: every ~93 days

Total

27

Last Release

1587d ago

Major Versions

v1.2.4 → v2.0.02021-04-09

v2.0.1 → v3.0.02022-04-13

PHP version history (3 changes)1.0.0PHP ^7.2

v1.0.9PHP ^7.4|^8.0

v3.0.0PHP ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1639226?v=4)[Fred Bradley](/maintainers/fredbradley)[@fredbradley](https://github.com/fredbradley)

---

Top Contributors

[![fredbradley](https://avatars.githubusercontent.com/u/1639226?v=4)](https://github.com/fredbradley "fredbradley (34 commits)")

---

Tags

cachecachinglaravelwordpress

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/fredbradley-cacher/health.svg)

```
[![Health](https://phpackages.com/badges/fredbradley-cacher/health.svg)](https://phpackages.com/packages/fredbradley-cacher)
```

###  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)
