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

ActiveLibrary[Caching](/categories/caching)

alonity/cache
=============

Alonity cache

06PHP

Since Aug 27Pushed 3y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Cache
=====

[](#cache)

Cache component

Install
-------

[](#install)

`composer require alonity/cache`

### Examples

[](#examples)

```
use alonity\cache\Cache;

require('vendor/autoload.php');

require_once('../vendor/autoload.php');

/**
 * Set storage
 * Default value: file
 * Supported storages: file, mongodb, redis, memcached, memcache
*/
Cache::$config['storage'] = 'mongodb';

// Set save path for file storage
Cache::$config['path'] = __DIR__.'/tmp/cache';

$storage = Cache::getStorage();

// Check storage if defined
if(is_null($storage)){
    exit(Cache::$error);
}

if(!Cache::save('hello', [
    ['id' => 1, 'name' => 'test'],
    ['id' => 2, 'name' => 'test2']
])){
    exit(Cache::$error);
}

var_dump(Cache::get('hello'));
```

Documentation:

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity26

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/2e5f56cbb91b132c04e03a2910f70a61ad19cb64da547f6f0761348f38347ae4?d=identicon)[alonity](/maintainers/alonity)

---

Top Contributors

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

### Embed Badge

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

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

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

PHPackages © 2026

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