Download the PHP package infocyph/cachelayer without Composer
On this page you can find all versions of the php package infocyph/cachelayer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package cachelayer
CacheLayer
CacheLayer is a standalone cache toolkit for modern PHP applications. It provides a unified API over PSR-6 and PSR-16 with local, distributed, and cloud adapters.
Project Background
CacheLayer was separated from the existing Intermix project to improve package visibility, maintenance focus, and faster feature enrichment for caching.
Features
- Unified
Cachefacade implementing PSR-6, PSR-16,ArrayAccess, andCountable - Adapter support for APCu, File, PHP Files, Memcached, Redis, Valkey, Redis Cluster, PDO (SQLite default), Shared Memory, MongoDB, and ScyllaDB
- Tiered cache composition via
Cache::tiered()(L1/L2/... descriptors or pool instances) - Tagged invalidation with versioned tags:
setTagged(),invalidateTag(),invalidateTags() - Stampede-safe
remember()with pluggable lock providers - Per-adapter metrics counters and export hooks
- Payload compression controls
- Value serializer helpers for closures/resources
- Memoization helpers:
memoize(),remember(),once()
Requirements
- PHP 8.3+
- Composer
Optional extensions/packages depend on adapter choice:
ext-apcuext-redisext-memcachedext-pdo+ driver (pdo_sqlite,pdo_pgsql,pdo_mysql, ...)ext-sysvshmmongodb/mongodbext-cassandra
Installation
Usage
Tiered Flow (L1 -> L2 -> DB)
Request flow:
- check APCu (L1)
- check Redis/Valkey (L2)
- query DB on miss
- write L2
- optionally write L1 (controlled by
writeToL1)
Security Hardening
CacheLayer includes optional payload/serialization hardening controls:
You can also set:
CACHELAYER_PAYLOAD_INTEGRITY_KEYCACHELAYER_MAX_PAYLOAD_BYTES
Testing
Or run the full test pipeline:
Security
Protected by PHPForge — an automated quality and security gate for PHP projects.
MIT Licensed
Documentation • Security • Code of Conduct • Contributing • Report | Request | Suggest
All versions of cachelayer with dependencies
opis/closure Version ^4.5
psr/cache Version ^3.0
psr/simple-cache Version ^3.0