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

08PHP

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 1mo 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 12% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

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

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

PHPackages © 2026

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