Skip to content

Redis history-cache operational cleanup #44

Description

@aaronashby

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions