marko / cache-file
File-based cache driver for Marko Framework
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:25 UTC
README
File-based cache driver — persists cached data to disk with automatic expiration and atomic writes.
Installation
composer require marko/cache-file
Quick Example
use Marko\Cache\Contracts\CacheInterface; class SettingsService { public function __construct( private CacheInterface $cache, ) {} public function getAll(): array { if ($this->cache->has('settings.all')) { return $this->cache->get('settings.all'); } $settings = $this->loadFromDatabase(); $this->cache->set('settings.all', $settings, ttl: 7200); return $settings; } }
Documentation
Full usage, API reference, and examples: marko/cache-file