cache/array-adapter
PSR-6 cache pool implemented with an in-memory PHP array. Zero configuration: just instantiate ArrayCachePool for fast, ephemeral caching in tests or single-request use. Part of the PHP Cache ecosystem with shared docs and optional features info.
Start by installing the package: composer require cache/array-adapter. Then instantiate the pool directly with $pool = new Cache\ArrayAdapter\ArrayCachePool();. Its zero-configuration nature makes it perfect for:
Use standard PSR-6 methods: getItem($key), save($item), clear(), and hasItem($key).
Cache\Pool\ChainCachePool for graceful degradation during development — e.g., try Redis first, fall back to array if unavailable.$pool->getItems() or $pool->debug() (if exposed) to introspect cached items, useful during development to verify cache hits/misses without external tools.clear() after heavy use.getItems()) or call clear() — the adapter doesn’t auto-gc during reads.Cache::remember()), not PSR-6. This adapter won’t plug in to Laravel’s native Cache facade without a bridge — better suited for PSR-6-aware libraries or custom test harnesses.How can I help you explore Laravel packages today?