Problem Statement
Language data from GitHub's /repos/{owner}/{repo}/languages endpoint is fetched fresh on every dashboard load. Language composition of a repo changes rarely — daily at most. This wastes GitHub API rate limit quota and slows down the repos widget.
Proposed Solution
Apply the existing withMetricsCache wrapper to the languages fetch with a long TTL (e.g. 6 hours). Language data for a given repo almost never changes intraday.
Alternatives Considered
- No cache: Current behavior — wastes rate limit
- Infinite cache: Too aggressive — user won't see new language additions
Acceptance Criteria
Additional Context
The METRICS_CACHE_TTL_SECONDS object in src/lib/metrics-cache.ts should get a languages: 21600 entry. This follows the same pattern as all other metric caches.
Problem Statement
Language data from GitHub's
/repos/{owner}/{repo}/languagesendpoint is fetched fresh on every dashboard load. Language composition of a repo changes rarely — daily at most. This wastes GitHub API rate limit quota and slows down the repos widget.Proposed Solution
Apply the existing
withMetricsCachewrapper to the languages fetch with a long TTL (e.g. 6 hours). Language data for a given repo almost never changes intraday.Alternatives Considered
Acceptance Criteria
withMetricsCacheand TTL = 21600 seconds (6h)repoNameto avoid cross-repo collisionsAdditional Context
The
METRICS_CACHE_TTL_SECONDSobject insrc/lib/metrics-cache.tsshould get alanguages: 21600entry. This follows the same pattern as all other metric caches.