Skip to content

feat(client): SEP-2549 — honor cacheHints (ttlMs/scope) on the response-cache substrate - #2340

Merged
felixweinberger merged 2 commits into
v2-2026-07-28from
fweinberger/cachehints-honoring
Jun 23, 2026
Merged

felixweinberger merged 2 commits into
v2-2026-07-28from
fweinberger/cachehints-honoring

docs(examples): caching story asserts client-side honouring; README a…

bf3bc85
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jun 23, 2026 in 36m 2s

Code review found 2 potential issues

Found 5 candidates, confirmed 2. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 2
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit docs/migration.md:578-595 New cache-honouring feature not documented in docs/client.md (only migration.md and the example README)
🟡 Nit packages/client/src/client/client.ts:1568-1575 Multi-page list aggregate honours only page 1 ttlMs/cacheScope (later pages stricter hints ignored; private page content

Annotations

Check warning on line 595 in docs/migration.md

See this annotation in the file changed.

@claude claude / Claude Code Review

New cache-honouring feature not documented in docs/client.md (only migration.md and the example README)

The new SEP-2549 cache-honouring behaviour (cache-served listTools()/readResource(), the per-call cacheMode option, and the new ClientOptions cachePartition/defaultCacheTtlMs) is documented here in migration.md and in examples/caching/README.md, but the canonical client feature guide docs/client.md was not updated — its Tools and Resources sections still describe these verbs as always reaching the server, with no mention of cache-serving or how to force a fetch. Consider adding a short 'Response

Check warning on line 1575 in packages/client/src/client/client.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

Multi-page list aggregate honours only page 1 ttlMs/cacheScope (later pages stricter hints ignored; private page contents can land in the shared public partition)

When _listAllPages aggregates a multi-page list, the terminal cache write computes freshness from this._freshness(acc) where acc is the page-1 result object, so ttlMs/cacheScope hints carried by pages 2..N are silently discarded. A later page's stricter hint is therefore ignored: a page-2 ttlMs: 0 ("do not cache") aggregate is served from cache for page-1's full TTL, and a page-2 cacheScope: 'private' is downgraded to page-1's 'public', storing the private-scoped page contents at the shared [ser