PHPackages                             itrnka/ha-apcu-middleware - 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. itrnka/ha-apcu-middleware

ActiveLibrary[Caching](/categories/caching)

itrnka/ha-apcu-middleware
=========================

APCu cache middleware for ha framework. This is a proxy to PHP APCu extension.

v1.0.1(8y ago)012Apache-2.0PHPPHP ^7.1

Since Nov 15Pushed 8y ago1 watchersCompare

[ Source](https://github.com/itrnka/ha-apcu-middleware)[ Packagist](https://packagist.org/packages/itrnka/ha-apcu-middleware)[ Docs](https://github.com/itrnka/ha-apcu-middleware)[ RSS](/packages/itrnka-ha-apcu-middleware/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

APCu cache driver middleware for *ha* framework
===============================================

[](#apcu-cache-driver-middleware-for-ha-framework)

APCu cache middleware for ha framework. This is a proxy to PHP APCu extension. Driver implements cache interface `ha\Middleware\Cache\Cache` from *ha* framework. So it can be used as a cache driver.

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

[](#installation)

Installation is available via composer:

```
composer require itrnka/ha-apcu-middleware
```

Requirements
------------

[](#requirements)

This package is based on [*ha* framework](https://github.com/itrnka/ha-framework). Composer installs *ha* framework if it is not already installed. [*APCu*](http://php.net/manual/en/book.apcu.php) php module is also required.

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

[](#configuration)

Required configuration keys:

- `name`: by ha framework requirements
- `keyPrefix`: *string* prefix for cache keys in your application
- `defaultTTL`: *int* default TTL value (must be `>= 0`)

Add your configuration to the configuration file in *ha* framework according to this example:

> Note: only single instance can be used in your application, class has pseudo singleton protection.

```
$cfg['middleware'] = [

    // ...

    // APCu cahce
    [
        ha\Middleware\Cache\APCu\APCu::class,
        [
            'name' => 'apc',
            'keyPrefix' => 'someUniqueKeyForAppInYourMachine',
            'defaultTTL' => 0,
        ]
    ],

    // ...

];
```

Then the driver will be available as follows:

```
// middleware instance
$apc = main()->middleware->apc;

// example call:
$value = main()->middleware->apc->get('myValue', null);
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

Total

2

Last Release

3102d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/39ace55c388fda477e26663ab4efa5325ff77a50c04739ed007ed60b7c8461ee?d=identicon)[itrnka](/maintainers/itrnka)

---

Top Contributors

[![itrnka](https://avatars.githubusercontent.com/u/4712899?v=4)](https://github.com/itrnka "itrnka (2 commits)")

---

Tags

apcapcucacheha-frameworkmiddlewareapcuHAapc

### Embed Badge

![Health badge](/badges/itrnka-ha-apcu-middleware/health.svg)

```
[![Health](https://phpackages.com/badges/itrnka-ha-apcu-middleware/health.svg)](https://phpackages.com/packages/itrnka-ha-apcu-middleware)
```

###  Alternatives

[gordalina/cachetool

Manage your OPcache &amp; APCu cache through the CLI

1.8k3.7M5](/packages/gordalina-cachetool)[tedivm/stash

The place to keep your cache.

9824.8M124](/packages/tedivm-stash)[sabre/cache

Simple cache abstraction layer implementing PSR-16

541.2M3](/packages/sabre-cache)[tedivm/stash-bundle

Incorporates the Stash caching library into Symfony.

841.4M16](/packages/tedivm-stash-bundle)[cache/apcu-adapter

A PSR-6 cache implementation using apcu. This implementation supports tags

173.0M22](/packages/cache-apcu-adapter)[jamm/memory

Key-value storage in memory. As a storage can be used: APC, Redis, Memcache, Shared memory. All storage objects have one interface, so you can switch them without changing the working code. Contains PHP Redis client.

13326.3k1](/packages/jamm-memory)

PHPackages © 2026

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