Skip to content

perf(cache): double the default fresh window to 24h - #316

Merged
vn7n24fzkq merged 1 commit into
mainfrom
perf/double-fresh-window
Jul 29, 2026
Merged

perf(cache): double the default fresh window to 24h#316
vn7n24fzkq merged 1 commit into
mainfrom
perf/double-fresh-window

Conversation

@vn7n24fzkq

@vn7n24fzkq vn7n24fzkq commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Halves steady-state GitHub refresh traffic while peak hours run close to the hourly quota ceiling (#308 follow-up). Viewers sit behind a 48h CDN window, so daily-refreshed data is indistinguishable from the previous 12h. Explicit windows (past years 90d, owner-type 7d) unchanged; stale-test fixtures aged past the new window.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Performance
    • Cached data now remains fresh for up to 24 hours instead of 12, reducing unnecessary refreshes.
    • Stale-cache fallback behavior continues to apply when refreshed data cannot be retrieved.

Peak hours run close to the GitHub hourly quota ceiling (#308 follow-up);
halving steady-state refresh traffic is the cheapest lever. Behind the
48h CDN window, data refreshed daily is indistinguishable from 12h.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e58bb197-7f41-49e8-9cd4-9f91bb7592c9

📥 Commits

Reviewing files that changed from the base of the PR and between ecd8361 and 83541c7.

📒 Files selected for processing (2)
  • src/utils/data-cache.ts
  • tests/utils/data-cache.test.ts

📝 Walkthrough

Walkthrough

The default data-cache freshness period increases from 12 hours to 24 hours. Tests for stale refreshes, stale fallbacks, and cache statistics now use timestamps older than 24 hours.

Changes

Cache freshness behavior

Layer / File(s) Summary
24-hour freshness window
src/utils/data-cache.ts, tests/utils/data-cache.test.ts
The default fresh-cache TTL changes to 24 hours, and stale-cache fixtures are updated to exceed the new threshold.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: doubling the default cache fresh window to 24 hours.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch perf/double-fresh-window

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@vn7n24fzkq
vn7n24fzkq merged commit c2d6565 into main Jul 29, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant