marko / cache-array
In-memory array cache driver for Marko Framework
Package info
github.com/marko-php/marko-cache-array
Type:marko-module
pkg:composer/marko/cache-array
0.0.1
2026-03-25 17:53 UTC
Requires
- php: ^8.5
- marko/cache: 0.0.1
- marko/config: 0.0.1
- marko/core: 0.0.1
Requires (Dev)
- marko/testing: 0.0.1
- pestphp/pest: ^4.0
This package is auto-updated.
Last update: 2026-03-25 21:07:36 UTC
README
In-memory cache driver — stores data for the duration of a single request with zero I/O overhead.
Installation
composer require marko/cache-array
Quick Example
use Marko\Cache\Contracts\CacheInterface; class ExpensiveService { public function __construct( private CacheInterface $cache, ) {} public function compute(string $key): array { if ($this->cache->has($key)) { return $this->cache->get($key); } $result = $this->doExpensiveWork($key); $this->cache->set($key, $result); return $result; } }
Documentation
Full usage, API reference, and examples: marko/cache-array