Skip to content

fix: invalidate leaderboard cache when settings change#2500

Merged
Priyanshu-byte-coder merged 1 commit into
Umbrella-io:mainfrom
Saksham-Joshi856:fix/leadeboard-cache-tag
Jun 16, 2026
Merged

fix: invalidate leaderboard cache when settings change#2500
Priyanshu-byte-coder merged 1 commit into
Umbrella-io:mainfrom
Saksham-Joshi856:fix/leadeboard-cache-tag

Conversation

@Saksham-Joshi856

Copy link
Copy Markdown
Contributor

Related Issue

Fixes #2497

Problem

When a user disabled leaderboard participation from Settings, the leaderboard could continue showing stale data until refresh.

Root Cause

The leaderboard cache was invalidated using revalidateTag("leaderboard"), but the unstable cache entry was not associated with the "leaderboard" tag.

Because of this, cache invalidation did not reliably refresh leaderboard data.

Solution

Added the leaderboard cache tag to the unstable_cache configuration.

Now:

  • leaderboard cache is tagged with "leaderboard"
  • settings changes can correctly invalidate cached leaderboard data
  • users opting in/out of leaderboard visibility see updated results immediately

Testing

  • ✅ npm run build
  • ⚠️ npm test has existing unrelated failures in Anthropic service mocking

@github-actions github-actions Bot added gssoc26 GSSoC 2026 contribution type:bug GSSoC type bonus: bug fix type:feature GSSoC type bonus: new feature type:performance GSSoC type bonus: performance (+15 pts) and removed gssoc26 GSSoC 2026 contribution labels Jun 16, 2026
@github-actions

Copy link
Copy Markdown

GSSoC Label Checklist 🏷️

@Umbrella-io — please apply the appropriate labels before merging:

Difficulty (pick one):

  • level:beginner — 20 pts
  • level:intermediate — 35 pts
  • level:advanced — 55 pts
  • level:critical — 80 pts

Quality (optional):

  • quality:clean — ×1.2 multiplier
  • quality:exceptional — ×1.5 multiplier

Validation (required to score):

  • gssoc:approved — counts for points
  • gssoc:invalid / gssoc:spam / gssoc:ai-slop — does not score

Type labels (type:*) are auto-detected from files and title. Review and adjust if needed.
Points formula: (difficulty × quality_multiplier) + type_bonus

@Priyanshu-byte-coder Priyanshu-byte-coder added gssoc:approved GSSoC: PR approved for scoring gssoc26 GSSoC 2026 contribution labels Jun 16, 2026
@Priyanshu-byte-coder Priyanshu-byte-coder merged commit eb532f1 into Umbrella-io:main Jun 16, 2026
4 checks passed
@github-actions

Copy link
Copy Markdown

🎉 Merged! Thanks for contributing to DevTrack.

If the project has been useful to you, a ⭐ star on the repo is the easiest way to support it — it helps DevTrack get discovered by more developers.

Keep an eye on open issues for your next contribution!

@Priyanshu-byte-coder Priyanshu-byte-coder added level:intermediate GSSoC: Intermediate difficulty (35 pts) quality:clean GSSoC: Clean quality multiplier (×1.2) labels Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved GSSoC: PR approved for scoring gssoc26 GSSoC 2026 contribution level:intermediate GSSoC: Intermediate difficulty (35 pts) quality:clean GSSoC: Clean quality multiplier (×1.2) type:bug GSSoC type bonus: bug fix type:feature GSSoC type bonus: new feature type:performance GSSoC type bonus: performance (+15 pts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Leaderboard does not update immediately after user opts out

2 participants