Skip to content

fix: cache repository languages fetch#1089

Open
Sammmyyyyyyy wants to merge 6 commits into
Priyanshu-byte-coder:mainfrom
Sammmyyyyyyy:fix/languages-cache
Open

fix: cache repository languages fetch#1089
Sammmyyyyyyy wants to merge 6 commits into
Priyanshu-byte-coder:mainfrom
Sammmyyyyyyy:fix/languages-cache

Conversation

@Sammmyyyyyyy
Copy link
Copy Markdown
Contributor

@Sammmyyyyyyy Sammmyyyyyyy commented May 25, 2026

Summary

Adds repository-level caching for GitHub language statistics to reduce unnecessary API calls and improve dashboard performance.

Closes #967

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor / code cleanup

Changes Made

  • Added languages cache TTL entry with a 6-hour duration
  • Added per-repository caching for GitHub /languages API requests
  • Added repo-specific cache keys using repoName
  • Removed redundant outer cache wrapper to avoid nested cache inefficiencies
  • Preserved cache bypass behavior for manual refresh actions

How to Test

Steps for the reviewer to verify this works:

  1. Run the development server using npm run dev
  2. Open the dashboard and load the language breakdown widget
  3. Verify repository language requests are cached
  4. Trigger a manual refresh and verify fresh GitHub API data is fetched
  5. Confirm no TypeScript or runtime errors occur

Screenshots (if UI change)

N/A

Checklist

  • Linked issue in summary
  • npm run lint passes locally
  • No TypeScript errors (npm run type-check)
  • Self-reviewed the diff
  • Added/updated tests if applicable

@vercel
Copy link
Copy Markdown

vercel Bot commented May 25, 2026

@Sammmyyyyyyy is attempting to deploy a commit to the PRIYANSHU DOSHI's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added gssoc26 GSSoC 2026 contribution type:bug GSSoC type bonus: bug fix labels May 25, 2026
@github-actions
Copy link
Copy Markdown

GSSoC Label Checklist 🏷️

@Priyanshu-byte-coder — 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

@github-actions github-actions Bot added the type:testing GSSoC type bonus: tests (+10 pts) label May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc26 GSSoC 2026 contribution type:bug GSSoC type bonus: bug fix type:testing GSSoC type bonus: tests (+10 pts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[PERF] Cache GitHub language API responses — currently refetches on every dashboard load

1 participant