marko/cache-redis

Redis cache driver for Marko Framework

Maintainers

Package info

github.com/marko-php/marko-cache-redis

Type:marko-module

pkg:composer/marko/cache-redis

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

0.0.1 2026-03-25 17:53 UTC

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