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

ActiveLibrary[Caching](/categories/caching)

mic2100/cache
=============

PSR-16 compatible caching library

18PHP

Since Nov 28Pushed 8y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Caching Library
===============

[](#caching-library)

[![Build Status](https://camo.githubusercontent.com/70d2ac4e06bb65bab203cbf2394033ae2bdd362218dc325a9df2662ad8033d78/68747470733a2f2f7472617669732d63692e6f72672f6d6963323130302f63616368652e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/mic2100/cache)

PSR-16 compatible caching library

Instructions

```
//Instantiate the Configuration class
$config = new \Mic2100\Cache\Configuration;

//Instantiate the SupplierInterface class (ArraySupplier or FileSupplier)
$supplier = new \Mic2100\Cache\Suppliers\ArraySupplier;

/**
 * If you are using the FileSupplier you will need to pass it a filename, this will need
 * to be the full path to a writable file.
 *
 * The second parameter can be true/false - JSON/Serialize. If you are only going
 * to store simple data types such as strings or integers the decoding will be much
 * faster using JSON, so pass true else it will default to using serialize/unserialize.
 */
$supplier = new \Mic2100\Cache\Suppliers\FileSupplier('', true/false);

//Add the supplier to the Configuration class
$config->setSupplier($supplier);

//Instantiate the Store and pass it the config
$store = new Store($config);

//Adding data to the store, the 3rd parameter can be either an integer (number of seconds) or a DateInterval object
$store->set('key1', 'Some test data', 300);

//Getting data from the store
$store->get('key1'); //returns: Some test data

//Removing the data from the store
$store->delete('key1');

//Removing all the data from the store
$store->clear();

//Check if the store has the data
if ($store->has('key')) {
    //the key exists in the store
}
```

```
                    _________________________
                   ||                       ||
                   ||      Store Front      ||
   ________________||_______________________||_____________
  |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_||
  |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|| /|
  |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_||/||
  |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|||/|
  |_|_|_|_|_|_|_|_|_|     _      _     |_|_|_|_|_|_|_|_|_|_|/||
  |_|               |    (_)    (_)    |                 |_|/||
  |_|  Suppliers:   |__________________|   Suppliers:    |_||/|
  |_|               |_|      ||      |_|                 |_|/||
  |_|   Memcache    |_|      ||      |_|      File       |_||/|
  |_|               |_|      ||      |_|                 |_|/||
  |_|     APC       |_|     [||]     |_|      Redis      |_||/|
  |_|               |_|      ||      |_|                 |_|/||
  |_|_______________|_|      ||      |_|_________________|_||/|
  |_|_|_|_|_|_|_|_|_|_|______||______|_|_|_|_|_|_|_|_|_|_|_|/||
__|_|_|_|_|_|_|_|_|_|_|______||______|_|_|_|_|_|_|_|_|_|_|_||/________
 /     /     /     /     /     /     /     /     /     /     /     /
/_____/_____/_____/_____/_____/_____/_____/_____/_____/_____/_____/
____________________________________________________________jro___

```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/cd22019623ac7e0ed3b0680eb602a6794fbbd4467ba905fa3ab07bfc962069ce?d=identicon)[mic2100](/maintainers/mic2100)

---

Top Contributors

[![mic2100](https://avatars.githubusercontent.com/u/2852547?v=4)](https://github.com/mic2100 "mic2100 (22 commits)")

### Embed Badge

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

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

###  Alternatives

[predis/predis

A flexible and feature-complete Redis/Valkey client for PHP.

7.8k305.7M2.4k](/packages/predis-predis)[snc/redis-bundle

A Redis bundle for Symfony

1.0k39.4M67](/packages/snc-redis-bundle)[react/cache

Async, Promise-based cache interface for ReactPHP

444112.4M40](/packages/react-cache)[wp-media/wp-rocket

Performance optimization plugin for WordPress

7431.3M3](/packages/wp-media-wp-rocket)[illuminate/cache

The Illuminate Cache package.

12835.6M1.4k](/packages/illuminate-cache)[colinmollenhour/php-redis-session-abstract

A Redis-based session handler with optimistic locking

6325.6M14](/packages/colinmollenhour-php-redis-session-abstract)

PHPackages © 2026

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