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

ActiveLibrary[Caching](/categories/caching)

mezon/cache
===========

Small cache script

1.0.1(5y ago)31.7k1MITPHPPHP &gt;=7.2.0CI failing

Since Feb 13Pushed 5y ago2 watchersCompare

[ Source](https://github.com/alexdodonov/mezon-cache)[ Packagist](https://packagist.org/packages/mezon/cache)[ Docs](https://github.com/alexdodonov/mezon-cache)[ RSS](/packages/mezon-cache/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (3)Versions (4)Used By (1)

Cache [![Build Status](https://camo.githubusercontent.com/0416a4be2799ec4e981cfb76057e17fa52adf83b6ebdd4513f152f17a9e967a0/68747470733a2f2f7472617669732d63692e636f6d2f616c6578646f646f6e6f762f6d657a6f6e2d63616368652e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/alexdodonov/mezon-cache) [![codecov](https://camo.githubusercontent.com/a150a8cad889895563b924ecc92473b68d410f61619f4f5ded493565599a5e4f/68747470733a2f2f636f6465636f762e696f2f67682f616c6578646f646f6e6f762f6d657a6f6e2d63616368652f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/alexdodonov/mezon-cache)
==================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#cache--)

Intro
-----

[](#intro)

[Mezon](https://github.com/alexdodonov/mezon) provides simple cache class. Wich will help you to test how caching will affect performance of your code. If the performance will be boosted, then you can implement more complex solutions for caching.

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

[](#installation)

Just print in console

```
composer require mezon/cache

```

And that's all )

How to use?
-----------

[](#how-to-use)

First of all we need to create single instance of cache ("singleton" pattern is used):

```
$cache = Cache::getInstance();
```

Then we can add data to cache:

```
$cache->set('key', 'data to be stored');
```

After all data was added you need to store it to be able using it within other requests.

```
$cache->flush();
```

And then you can check if the key exists:

```
var_dump($cache->exists('key')); // bool(true)
var_dump($cache->exists('unexisting-key')); // bool(false)
```

And then you can fetch data by it's key:

```
var_dump($cache->get('key')); // string('data to be stored')
```

That's all for now )

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity54

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

Total

3

Last Release

1917d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/14943896?v=4)[alexdodonov](/maintainers/alexdodonov)[@alexdodonov](https://github.com/alexdodonov)

---

Top Contributors

[![alexdodonov](https://avatars.githubusercontent.com/u/14943896?v=4)](https://github.com/alexdodonov "alexdodonov (7 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[barryvdh/laravel-httpcache

HttpCache for Laravel

502404.4k10](/packages/barryvdh-laravel-httpcache)

PHPackages © 2026

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