PHPackages                             m6web/apcu-bundle - 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. m6web/apcu-bundle

ActiveSymfony-bundle[Caching](/categories/caching)

m6web/apcu-bundle
=================

Provide APCu support

v3.0.0(4y ago)2130.7k↓55.6%1[1 issues](https://github.com/BedrockStreaming/ApcuBundle/issues)PHPPHP ^8.0

Since Apr 28Pushed 4y ago47 watchersCompare

[ Source](https://github.com/BedrockStreaming/ApcuBundle)[ Packagist](https://packagist.org/packages/m6web/apcu-bundle)[ RSS](/packages/m6web-apcu-bundle/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (10)Dependencies (4)Versions (13)Used By (0)

Bundle APCu [![Build Status](https://github.com/BedrockStreaming/apcuBundle/actions/workflows/ci.yml/badge.svg)](https://github.com/BedrockStreaming/apcuBundle/actions/workflows/ci.yml) [![Total Downloads](https://camo.githubusercontent.com/ae9745f7f72d9e9b4969577abee0ca1169ab9402b30554938379ceb4389d54e5/68747470733a2f2f706f7365722e707567782e6f72672f6d367765622f617063752d62756e646c652f646f776e6c6f6164732e737667)](https://packagist.org/packages/m6web/apcu-bundle) [![License](https://camo.githubusercontent.com/e79db5643ab43f3238333bcfc9e9bf34058a228349d41f7358d1c02977fe9ad5/687474703a2f2f706f7365722e707567782e6f72672f6d367765622f617063752d62756e646c652f6c6963656e7365)](https://packagist.org/packages/m6web/apcu-bundle) [![PHP Version Require](https://camo.githubusercontent.com/3f9e80a25b016bab9fbe2cd34d726bd2d0a2c6c71dde2935b0a378292087ddfd/687474703a2f2f706f7365722e707567782e6f72672f6d367765622f617063752d62756e646c652f726571756972652f706870)](https://packagist.org/packages/m6web/apcu-bundle)
============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#bundle-apcu----)

Provide APCu support, see [PECL/APCu](http://pecl.php.net/package/APCu).

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

[](#installation)

Via [Composer](https://getcomposer.org/) :

```
"require": {
    "m6web/apcu-bundle" : "^1.4"
}
```

Also require the PECL extension APCu :

```
# pecl install -f apcu
```

Don't forget to enable the extension in your *php.ini*.

*NB: due to an update in APCu API, from ApcuBundle v1.1.1, you must install APCu v4.0.7 or higher*

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

[](#configuration)

The main configuration key is `m6web_apcu`. Each subkey defines a new Apcu cache service. These services are named `m6web_apcu + subkey`. For each service, several parameters can be set :

- `namespace` (string, optional) : Empty by default. Namespace for all keys stored in APCu cache via this instance.
- `ttl` (integer, optionnal) : 3600 (seconds) by default. Define the default TTL used when no TTL is given to store data.
- `class` (string, optionnal) : You can override the default cache class. It should extends `M6Web\Bundle\ApcuBundle\Apcu\Apcu`.

### Example

[](#example)

```
m6web_apcu:
    myCache:
        namespace: 6play-api-applaunch
        ttl: 3600
    otherCache: ~
```

Usage
-----

[](#usage)

```
$cache = $container->get('m6web_apcu.myCache');
$key   = 'myCacheKey';

var_dump($cache->exists($key)); // boolean, false

$cache->store($key, 'Hello', 3600)

var_dump($cache->exists($key)); // boolean, true
var_dump($cache->fetch($key)); // string, Hello

$cache->delete($key);

var_dump($cache->exists($key)); // boolean, false
var_dump($cache->fetch($key)); // bolean, false
```

Tests
-----

[](#tests)

If you wish to run Bundle tests, you must enable APCu in CLI environment by defining `apc.enable_cli` option to `1`.

Then you can run the tests :

```
$ ./vendor/bin/phpunit tests
```

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~606 days

Total

10

Last Release

1468d ago

Major Versions

v1.4.0 → v2.1.02022-08-08

v2.1.0 → v3.0.02022-08-10

PHP version history (3 changes)v1.0.1PHP &gt;=5.5

v2.1.0PHP &gt;=7.4

v3.0.0PHP ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2069361?v=4)[Patrick](/maintainers/Bedrock)[@Bedrock](https://github.com/Bedrock)

![](https://www.gravatar.com/avatar/4f041a1974dbc19c70e199fb278d9b9026409999444087c7efbd1cb249a49f3a?d=identicon)[omansour](/maintainers/omansour)

---

Top Contributors

[![systemasis](https://avatars.githubusercontent.com/u/6206872?v=4)](https://github.com/systemasis "systemasis (15 commits)")[![omansour](https://avatars.githubusercontent.com/u/1131098?v=4)](https://github.com/omansour "omansour (10 commits)")[![titoko](https://avatars.githubusercontent.com/u/1798254?v=4)](https://github.com/titoko "titoko (4 commits)")[![lnahiro](https://avatars.githubusercontent.com/u/14995154?v=4)](https://github.com/lnahiro "lnahiro (3 commits)")[![mikaelrandy](https://avatars.githubusercontent.com/u/187703?v=4)](https://github.com/mikaelrandy "mikaelrandy (3 commits)")[![jubianchi](https://avatars.githubusercontent.com/u/327237?v=4)](https://github.com/jubianchi "jubianchi (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/m6web-apcu-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/m6web-apcu-bundle/health.svg)](https://phpackages.com/packages/m6web-apcu-bundle)
```

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