marko/page-cache

Full-page HTTP cache interfaces and middleware for Marko Framework

Maintainers

Package info

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

Type:marko-module

pkg:composer/marko/page-cache

Statistics

Installs: 0

Dependents: 2

Suggesters: 0

Stars: 0

0.6.0 2026-05-12 13:37 UTC

This package is auto-updated.

Last update: 2026-05-12 17:50:24 UTC


README

Contracts, middleware, and CLI for full-page HTTP response caching --- cache entire responses to serve pages in microseconds.

Installation

composer require marko/page-cache marko/page-cache-file

Note: This package defines contracts only --- install a driver such as marko/page-cache-file for storage.

Quick Example

use Marko\PageCache\Attributes\Cacheable;
use Marko\Routing\Attributes\Get;
use Marko\Routing\Http\Response;

class ProductController
{
    #[Get('/products/{id}')]
    #[Cacheable(ttl: 3600, tags: ['products', 'product-{id}'])]
    public function show(int $id): Response
    {
        return Response::ok($this->productRepository->find($id));
    }
}

Documentation

Full usage, API reference, and examples: marko/page-cache