PHPackages                             nazg/hcache - 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. nazg/hcache

ActiveLibrary[Caching](/categories/caching)

nazg/hcache
===========

cache that boosts performance

0.6.1(5y ago)26.2k[1 issues](https://github.com/nazg-hack/hcache/issues)1MITHack

Since Apr 4Pushed 5y ago1 watchersCompare

[ Source](https://github.com/nazg-hack/hcache)[ Packagist](https://packagist.org/packages/nazg/hcache)[ RSS](/packages/nazg-hcache/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (10)Dependencies (7)Versions (20)Used By (1)

Nazg\\HCache
============

[](#nazghcache)

[![Build Status](https://camo.githubusercontent.com/d1f79f11c6b9ff1aca99b105cebba6b28a31964b6730303df872415fa6192028/687474703a2f2f696d672e736869656c64732e696f2f7472617669732f6e617a672d6861636b2f6863616368652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/nazg-hack/hcache)

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

[](#installation)

```
$ composer require nazg/hcache
```

Usage
-----

[](#usage)

*supported apc, memcached, map, void, filesystem*

### Using the CacheManager

[](#using-the-cachemanager)

```
createCache('memcached');
$mc = new \Memcached('mc');
$mc->addServers([['127.0.0.1', 11211]]);
$cache->setMemcached($mc);
$cache->createCache('map')?->save('cache', new Element('testing', 0));
```

cache namecache driverapc\\Nazg\\HCache\\Driver\\ApcCachevoid\\Nazg\\HCache\\Driver\\VoidCachemap\\Nazg\\HCache\\Driver\\MapCachefile\\Nazg\\HCache\\Driver\\FileSystemCachememcached\\Nazg\\HCache\\Driver\\MemcachedCacheredis\\Nazg\\HCache\\Driver\\RedisCache### Cache Usage

[](#cache-usage)

#### Retrieving Item From The Cache

[](#retrieving-item-from-the-cache)

```
save('file', new Element('testing', 0));

$cache->fetch('file');
$cache->contains('file')
$cache->flushAll();
```

#### MapCache (memory)

[](#mapcache-memory)

```
save('map', new Element('testing', 0));
```

#### MemcachedCache

[](#memcachedcache)

```
addServers([['127.0.0.1', 11211]]);
$cache->setMemcached($mc);
$cache->save("qwerty", new Element('testing:cache', 0));
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity21

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

Total

15

Last Release

2140d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/47817f3dd2890864096bd77ee772ec46061432f128988ca23939b0ca486d7bc3?d=identicon)[ytake](/maintainers/ytake)

---

Top Contributors

[![ytake](https://avatars.githubusercontent.com/u/4454078?v=4)](https://github.com/ytake "ytake (40 commits)")

---

Tags

cachehackhhvmcachehhvmhack

### Embed Badge

![Health badge](/badges/nazg-hcache/health.svg)

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

PHPackages © 2026

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