Skip to content

Conversation

@LuckySilver0021
Copy link

Changes

  • Added backend/src/utils/all-time-leaderboard-cache.ts with 15min TTL
  • backend/src/dal/leaderboards.ts now checks cache HIT/MISS first
  • backend/src/types/result.ts calls cache.clear() on result submit
  • Fixed TypeScript lint errors (interface→type, any→unknown)

Benefits

  • Reduces MongoDB load during peak traffic
  • Cache auto-expires every 15 mins

Closes #
(@LuckySilver0021)

@monkeytypegeorge monkeytypegeorge added the backend Server stuff label Jan 25, 2026
@github-actions
Copy link
Contributor

Hey there and thank you for opening this pull request! 👋🏼

We require pull request titles to follow the Conventional Commits specification and also include the author name at the end inside parenthesis. It looks like your proposed title needs to be adjusted.

Details:

Title "feat: added 15 minutes of TTL for 1st page of all time leaderboard"
didn't match the configured pattern. Please ensure that the title
contains your name so that you can be credited in our changelog.

A correct version would look something like:

feat: add new feature (@github_username)
impr(quotes): add english quotes (@username)
fix(leaderboard): show user rank correctly (@user1, @user2, @user3)

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

Labels

backend Server stuff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants