marko / cache-redis
Redis cache driver for Marko Framework
Package info
github.com/marko-php/marko-cache-redis
Type:marko-module
pkg:composer/marko/cache-redis
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
- predis/predis: ^2.0
Requires (Dev)
- marko/testing: 0.0.1
- pestphp/pest: ^4.0
This package is auto-updated.
Last update: 2026-03-25 21:07:28 UTC
README
Redis cache driver --- fast, persistent caching backed by Redis for production workloads.
Installation
composer require marko/cache-redis
Quick Example
use Marko\Cache\Contracts\CacheInterface; class SessionStore { public function __construct( private CacheInterface $cache, ) {} public function getSession(string $token): ?array { return $this->cache->get("session.$token"); } public function saveSession(string $token, array $data): void { $this->cache->set("session.$token", $data, ttl: 1800); } }
Documentation
Full usage, API reference, and examples: marko/cache-redis