PHPackages                             mactronique/phpcache - 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. mactronique/phpcache

Abandoned → [psr/simple-cache](/?search=psr%2Fsimple-cache)ArchivedLibrary[Caching](/categories/caching)

mactronique/phpcache
====================

Avanced cache manager for PHP. Driver : xcache and wincache

1.0.5(9y ago)1664[2 issues](https://github.com/Mactronique/phpcache/issues)1MITPHPPHP &gt;=5.4

Since Jul 23Pushed 7y ago1 watchersCompare

[ Source](https://github.com/Mactronique/phpcache)[ Packagist](https://packagist.org/packages/mactronique/phpcache)[ RSS](/packages/mactronique-phpcache/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (6)Dependencies (1)Versions (7)Used By (1)

phpcache
========

[](#phpcache)

[![Build Status](https://camo.githubusercontent.com/d3cf176a12ce0154f84a8cf57a229d903bd211a37aff1adf6009cd52b0bae4a3/68747470733a2f2f7472617669732d63692e6f72672f4d616374726f6e697175652f70687063616368652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Mactronique/phpcache)[![Dependency Status](https://camo.githubusercontent.com/1cf9f62876dc25579a5c7ae2d1f00f5ada59e77ae213daf983bc008c2e29d267/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3535633236373665363533373632303031613030323837662f62616467652e7376673f7374796c653d666c6174)](https://www.versioneye.com/user/projects/55c2676e653762001a00287f)[![Latest Stable Version](https://camo.githubusercontent.com/b0bef68ffc6442f3989a3ee6a662ed6e693c55d762dd185df88b6e6d6e453fa1/68747470733a2f2f706f7365722e707567782e6f72672f6d616374726f6e697175652f70687063616368652f762f737461626c65)](https://packagist.org/packages/mactronique/phpcache)[![Latest Unstable Version](https://camo.githubusercontent.com/bf38b642c0f2cc2807536717ec47faf4142b743261dd3b093bc3babd1aef89d6/68747470733a2f2f706f7365722e707567782e6f72672f6d616374726f6e697175652f70687063616368652f762f756e737461626c65)](https://packagist.org/packages/mactronique/phpcache)[![License](https://camo.githubusercontent.com/d35b29925a5b2fafd88ea6a8205f81abcf955163e4ddf6e1eec7e36e3cf98f89/68747470733a2f2f706f7365722e707567782e6f72672f6d616374726f6e697175652f70687063616368652f6c6963656e7365)](https://packagist.org/packages/mactronique/phpcache)

Supported driver
----------------

[](#supported-driver)

- xCache
- WinCache
- Predis
- Redis
- Memcached
- Null (special for instanciate no effect cache driver)

Install
-------

[](#install)

```
php composer.phar require mactronique/phpcache "~1.0"
```

Configuration
-------------

[](#configuration)

### for xCache

[](#for-xcache)

No configuration need.

### for WinCache

[](#for-wincache)

No configuration need.

### for Null

[](#for-null)

No configuration need.

### For Predis

[](#for-predis)

```
$config = array(
	"host" => "127.0.0.1",
	"port" => "",
	"password" => "",
	"database" => "",
	"timeout" => 1,
	"read_write_timeout" => 1
);
```

Only `host` key is required.

For Redis
---------

[](#for-redis)

```
$config = array(
	"host" => "127.0.0.1",
	"port" => "",
	"password" => "",
	"database" => "",
	"timeout" => 1
);
```

Only `host` key is required.

For Redis
---------

[](#for-redis-1)

```
$config = array(
	"host" => "127.0.0.1",
	"port" => 11211,
	"sharing" => 100
);
```

Only `host` key is required.

Example of use NullDriver
=========================

[](#example-of-use-nulldriver)

This code is example of service class

```
use Mactronique\PhpCache\Service\PhpCache;
use Mactronique\PhpCache\Driver\NullDriver;

class myService
{
	private $cache
	public function __construct(PhpCache $cache = null)
	{
		if (null === $cache) {
			$cache = new PhpCache();
			$cache->registerDriver(new NullDriver());
		}
		$this->cache = $cache;
	}

	public function myAction()
	{
		/*
		You can use the cache but never key exist and all get return null.
		*/
		$val = $this->cache->get('key');
		[...]
	}
}
```

###  Health Score

24

—

LowBetter than 30% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

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

Recently: every ~117 days

Total

6

Last Release

3569d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a15c90b32e75c27fc63f79357a914b4caa7af5fdb69a2e150341515ddececf95?d=identicon)[Macintosh\_plus](/maintainers/Macintosh_plus)

---

Top Contributors

[![macintoshplus](https://avatars.githubusercontent.com/u/814683?v=4)](https://github.com/macintoshplus "macintoshplus (48 commits)")

### Embed Badge

![Health badge](/badges/mactronique-phpcache/health.svg)

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

###  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)[ichhabrecht/intcache

Turn uncachable page objects into cacheable links

193.9k](/packages/ichhabrecht-intcache)

PHPackages © 2026

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