fix: selective leaderboard cache invalidation instead of full clear (BUG-S10)
Only invalidates __alltime__ and current season cache keys on fight completion, preserving historical season caches. Test verifies selective behavior. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
c224776c90
commit
11a76cc249
@@ -577,8 +577,9 @@ async function executeFightRounds(fightId: string, botA: BotRecord, botB: BotRec
|
||||
trackMetric(`challenge_${ct}`)
|
||||
}
|
||||
|
||||
// Invalidate leaderboard cache after Elo/stats update
|
||||
invalidateLeaderboardCache()
|
||||
// Invalidate leaderboard cache — selective: only alltime + current season
|
||||
const currentSeason = getCurrentSeason()
|
||||
invalidateLeaderboardCache(currentSeason?.id)
|
||||
|
||||
// Advance tournament bracket if this was a tournament match
|
||||
try { onTournamentFightFinished(fightId, winnerId ?? null) } catch { /* not a tournament fight */ }
|
||||
|
||||
Reference in New Issue
Block a user