Caching
--server-cache stores successful renders on disk and answers repeat GETs from the store.
Keys
An entry’s key combines the server’s startup arguments with the request’s URL and render parameters. Restarting with different arguments leaves earlier entries unreachable. The signature is not part of the key, so a signed GET and an unsigned POST for the same render share one entry. MCP requests are never cached.
Reads and Writes
A GET / is served from a fresh entry when one exists. A POST / always renders, then writes its result over any entry for later GETs. An entry stays fresh for --server-cache-ttl seconds; the oldest entries are evicted once the store passes --server-cache-size-limit.
Each hit is checked against its stored digest; a mismatch evicts the entry and renders again. A cache error never fails a render.
Response Headers
| Header | Value |
|---|---|
Cache-Control | public, max-age=<seconds of freshness left> |
ETag | the body’s content digest |
Last-Modified | when the entry was rendered |
Age | seconds since then, on a hit |
A GET whose If-None-Match matches the ETag, or whose If-Modified-Since is at or after Last-Modified, answers 304.
Purging
DELETE / takes the same arguments as a render, as query parameters or a JSON body, and is authorized like a GET.
| Request | Response |
|---|---|
| arguments with a fresh entry | 204; the entry expires |
| arguments with no fresh entry | 410 |
| no arguments | 204; every entry expires |
any, without --server-cache | 404 |
On a server with signed URLs and no credential auth, sign the DELETE’s query; a JSON body carries no signature and is rejected.