Overview
Small follow-ups once Redis is live in production: keep the docs honest about which implementation is used when, and sanity-check the memory-budget assumption this repo has been carrying since before Redis existed.
Acceptance criteria
- Update the comment block atop
lib/historyCache.ts (currently phrases the Redis swap as a future event) to describe both implementations as they now exist and when each is selected, rather than describing a completed migration as still-upcoming.
- Sanity-check the "~75 KB per session" estimate against a real multi-turn transcript's JSON size, and correct the concurrent-session budget note if it's meaningfully off.
- Confirm
historyCache.delete on session completion (already called from app/api/sessions/[id]/message/route.ts) frees the Upstash key immediately rather than relying on the TTL to eventually reclaim it — true by construction for the in-memory Map.delete; verify it's still true for the Redis DEL call.
Overview
Small follow-ups once Redis is live in production: keep the docs honest about which implementation is used when, and sanity-check the memory-budget assumption this repo has been carrying since before Redis existed.
Acceptance criteria
lib/historyCache.ts(currently phrases the Redis swap as a future event) to describe both implementations as they now exist and when each is selected, rather than describing a completed migration as still-upcoming.historyCache.deleteon session completion (already called fromapp/api/sessions/[id]/message/route.ts) frees the Upstash key immediately rather than relying on the TTL to eventually reclaim it — true by construction for the in-memoryMap.delete; verify it's still true for the RedisDELcall.