cache/apcu-adapter

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

Maintainers

Package info

github.com/php-cache/apcu-adapter

Homepage

pkg:composer/cache/apcu-adapter

Transparency log

Statistics

Installs: 3 254 752

Dependents: 32

Suggesters: 5

Stars: 17

3.0.0 2026-08-20 01:59 UTC

This package is auto-updated.

Last update: 2026-08-20 02:25:32 UTC


README

Latest Stable Version Coverage Software License

This package provides PSR-6 and PSR-16 cache implementations backed by APCu. The pool also supports tags.

Installation

Install the package and enable the APCu extension:

composer require cache/apcu-adapter:^3.0

Usage

use Cache\Adapter\Apcu\ApcuCachePool;

$pool = new ApcuCachePool();

Upgrading to version 3

Version 3 stores a generation snapshot with each tagged item and a separate marker for each tag. Version 2 workers cannot safely share this format.

Stop all workers, clear APCu, and then deploy version 3. Follow the same sequence before a rollback.

Upgrading to version 2

Version 2 stores native arrays instead of serialized strings. Older workers cannot read entries written by version 2.

Stop all workers, clear APCu, and then deploy version 2. Follow the same sequence before a rollback.

Contributing

Send pull requests to the main repository. Report issues on the GitHub issue tracker.