fix: show current month data and add caching (#2573)

### Summary

- Add Cache-Control headers to all route responses (1h s-maxage, 2h
stale-while-revalidate)
- Append current month to chart data so graphs stay up-to-date
(cumulative carries forward, else zero)
- Remove `.limit(12)` from growth queries for full history
- Pass isCumulative flag through addZeroMonth
- Deduplicate TransformedData type, remove transformRepoStats
This commit is contained in:
Ephraim Duncan
2026-03-06 02:30:31 +00:00
committed by GitHub
parent c63b4ca3cc
commit 7e2cbe46c0
20 changed files with 50 additions and 49 deletions
@@ -10,6 +10,7 @@ export async function GET(request: Request) {
status: 200,
headers: {
'content-type': 'application/json',
'Cache-Control': 'public, s-maxage=3600, stale-while-revalidate=7200',
},
}),
);