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

ActiveLibrary[Caching](/categories/caching)

thruster/data-cacher
====================

Thruster DataCacher Component

1.0.0(10y ago)0231MITPHPPHP &gt;=7.0

Since Dec 6Pushed 10y ago1 watchersCompare

[ Source](https://github.com/ThrusterIO/data-cacher)[ Packagist](https://packagist.org/packages/thruster/data-cacher)[ Docs](https://thruster.io)[ RSS](/packages/thruster-data-cacher/feed)WikiDiscussions master Synced 2mo ago

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

DataCacher Component
====================

[](#datacacher-component)

\[[![Latest Version](https://camo.githubusercontent.com/54002ced413a37fe82072e58ccbb5d7e496644a40e9b362116533c452e43a459/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f5468727573746572494f2f646174612d6361636865722e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/54002ced413a37fe82072e58ccbb5d7e496644a40e9b362116533c452e43a459/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f5468727573746572494f2f646174612d6361636865722e7376673f7374796c653d666c61742d737175617265)\] () \[[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)\] (LICENSE) \[[![Build Status](https://camo.githubusercontent.com/a66fe29b4aa483da3ec32eae17ffb118eaa6321fcf819403cb2eee194f1bc824/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f5468727573746572494f2f646174612d6361636865722e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/a66fe29b4aa483da3ec32eae17ffb118eaa6321fcf819403cb2eee194f1bc824/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f5468727573746572494f2f646174612d6361636865722e7376673f7374796c653d666c61742d737175617265)\] () \[[![Code Coverage](https://camo.githubusercontent.com/cfa9da583a7d9e012129474403a31c90069d947c70b7b19788a36ac0caf77470/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f5468727573746572494f2f646174612d6361636865722e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/cfa9da583a7d9e012129474403a31c90069d947c70b7b19788a36ac0caf77470/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f5468727573746572494f2f646174612d6361636865722e7376673f7374796c653d666c61742d737175617265)\] () \[[![Quality Score](https://camo.githubusercontent.com/7c61cca2f24855c5e6dd8c5d8a0f5dfe7f80d8f27892855b6a646de45495516a/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f5468727573746572494f2f646174612d6361636865722e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/7c61cca2f24855c5e6dd8c5d8a0f5dfe7f80d8f27892855b6a646de45495516a/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f5468727573746572494f2f646174612d6361636865722e7376673f7374796c653d666c61742d737175617265)\] () \[[![Total Downloads](https://camo.githubusercontent.com/a23b30b0b5365e790e4b00bf0b5a69843c5c33dd081e6545a13f00bb5882ad02/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f74687275737465722f646174612d6361636865722e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/a23b30b0b5365e790e4b00bf0b5a69843c5c33dd081e6545a13f00bb5882ad02/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f74687275737465722f646174612d6361636865722e7376673f7374796c653d666c61742d737175617265)\] ()

\[[![Email](https://camo.githubusercontent.com/fc4998410b6b71d697bf556c37294970fedc130c081c82698cdb5ca22d70cade/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f656d61696c2d7465616d4074687275737465722e696f2d626c75652e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/fc4998410b6b71d697bf556c37294970fedc130c081c82698cdb5ca22d70cade/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f656d61696c2d7465616d4074687275737465722e696f2d626c75652e7376673f7374796c653d666c61742d737175617265)\] ()

The Thruster DataCacher Component.

Install
-------

[](#install)

Via Composer

```
$ composer require thruster/data-cacher
```

Usage
-----

[](#usage)

```
$someCacher = new class extends BaseDataCacher
{
    public static function getName() : string
    {
        return 'some_cacher';
    }

    public function getKey($keyData) : array
    {
        return ['some', $keyData];
    }

    public function getTTL() : int
    {
        return 60 * 60 * 24 * 7
    }
};

$dataCacher = new DataCacher($driver, $someCacher);

$dataCacher->cache($object->getId(), $object);
$dataCacher->get(101);
```

Testing
-------

[](#testing)

```
$ composer test
```

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

[](#contributing)

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

License
-------

[](#license)

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

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

3813d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/770bae1f46ac2b4536db820b8642491c25e2e2fd44e761110269e4722679a80d?d=identicon)[aurimasniekis](/maintainers/aurimasniekis)

---

Tags

datacachecacherthrusterdatacacherdata-cacher

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[psr/simple-cache

Common interfaces for simple caching

8.1k727.3M2.1k](/packages/psr-simple-cache)[psr/cache

Common interface for caching libraries

5.2k686.9M1.3k](/packages/psr-cache)[react/cache

Async, Promise-based cache interface for ReactPHP

444112.4M40](/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.

2512.2M6](/packages/beste-in-memory-cache)[anahkiasen/flatten

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

33313.0k](/packages/anahkiasen-flatten)[rtcamp/nginx-helper

Cleans nginx's fastcgi/proxy cache or redis-cache whenever a post is edited/published. Also provides cloudflare edge cache purging with Cache-Tags.

23817.0k1](/packages/rtcamp-nginx-helper)

PHPackages © 2026

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