Parent: #382
Problem
SlackAdapter::user_cache is a HashMap<String, (String, Instant)> with a 5-minute TTL per entry, but no max size. In a busy Slack workspace with many unique users, the cache grows indefinitely since expired entries are only evicted on cache hit (lazy eviction).
Suggested fix
Add a max entries cap (e.g. 1000). On insert, if over cap, evict the oldest entry. Alternatively, use an LRU cache crate.
Severity: low — only affects large workspaces with 1000+ unique users interacting with the bot.
Parent: #382
Problem
SlackAdapter::user_cacheis aHashMap<String, (String, Instant)>with a 5-minute TTL per entry, but no max size. In a busy Slack workspace with many unique users, the cache grows indefinitely since expired entries are only evicted on cache hit (lazy eviction).Suggested fix
Add a max entries cap (e.g. 1000). On insert, if over cap, evict the oldest entry. Alternatively, use an LRU cache crate.
Severity: low — only affects large workspaces with 1000+ unique users interacting with the bot.