Search by

sailantis / azera-cache

lumielis

Cache companion for the Azera framework: production-grade PSR-16 backends (Redis, File, APCu, Memcached, Memory) and decorators (Chain, Taggable, Namespace, Memoizing).

Package info

github.com/sailantis/azera-cache

pkg:composer/sailantis/azera-cache

Statistics

Installs: 1

Dependents: 0

Suggesters: 1

Stars: 0

Open Issues: 0

v0.4.2 2026-11-16 00:04 UTC

This package is auto-updated.

Last update: 2026-11-16 00:19:45 UTC


README

Cache companion for the Azera framework.

The framework ships PSR-16 dev/null implementations (ArrayCache, NullCache, InvalidArgumentException). This package provides the production-grade backends the docs defer (docs/14-CACHE.md):

  • Azera\Cache\Backend\RedisCache — ext-redis adapter with pipelined batch operations.
  • Azera\Cache\Backend\FileCache — sharded, atomic-write file cache (no extension needed).
  • Azera\Cache\Backend\ApcuCache — ext-apcu single-host shared-memory adapter (no external program needed).
  • Azera\Cache\Backend\MemcachedCache — ext-memcached adapter (requires a running memcached server).
  • Azera\Cache\Backend\MemcacheCache — ext-memcache (legacy Memcache class) adapter (requires a running memcached server).
  • Azera\Cache\Backend\MemoryCache — bounded, array-backed cache with LRU eviction for long-running daemons.
  • Azera\Cache\Decorator\ChainCache — layered read-through with write-through + stampede protection.
  • Azera\Cache\Decorator\TaggableCache — tag-based invalidation on top of any PSR-16 backend.
  • Azera\Cache\Decorator\NamespaceCache — key-prefix decorator for multi-tenant isolation.
  • Azera\Cache\Decorator\MemoizingCache — remember($key, $ttl, $loader) with optional locking.

Note on external programs: MemcachedCache and MemcacheCache both require a running memcached server in addition to the PHP extension. RedisCache requires a Redis server. ApcuCache and MemoryCache and FileCache need nothing extra.

All backends implement \Psr\SimpleCache\CacheInterface directly (per patterns.md: depend on the PSR, no framework-specific cache interface) and reuse the framework's Azera\Cache\InvalidArgumentException for key validation.

Installation

composer require sailantis/azera-cache

License

MIT.