Nexus API Reference

RouteCachePersister
in package

Read onlyYes
FinalYes
Tags
psalm-api

PSR-16-backed persistence of route metadata. Closure handlers are skipped from the cache (they can't be serialized) — callers re-add them from the in-memory collection after a hit.

Cache payload shape: list of [method, path, handler, middleware[], name] arrays. var_export-safe so any PSR-16 backend can serialize it.

Table of Contents

Methods

__construct()  : mixed
clear()  : void
load()  : array<int, Route>|null
Returns the cached routes, or null on miss.
save()  : void
Persist the string-handler subset of the given routes.

Methods

__construct()

public __construct(CacheInterface $cache, string $key) : mixed
Parameters
$cache : CacheInterface
$key : string

save()

Persist the string-handler subset of the given routes.

public save(array<int, Route$routes) : void
Parameters
$routes : array<int, Route>

        
On this page

Search results