Skip to content

fix(stats): prevent caching fallback stats responses - #259

Open
badjoke-lab wants to merge 1 commit into
mainfrom
codex/fix-stats-fallback-persistence-bug
Open

fix(stats): prevent caching fallback stats responses#259
badjoke-lab wants to merge 1 commit into
mainfrom
codex/fix-stats-fallback-persistence-bug

Conversation

@badjoke-lab

Copy link
Copy Markdown
Owner

Motivation

  • Prevent JSON fallback responses from being cached so a temporary DB outage does not cause stale fallback data to be persisted after DB recovery.

Description

  • Reduce CACHE_CONTROL TTL from s-maxage=7200, stale-while-revalidate=600 to s-maxage=30, stale-while-revalidate=30 and add a FALLBACK_CACHE_CONTROL = "no-store" constant; use FALLBACK_CACHE_CONTROL for the DB->JSON fallback response so fallback results are served with Cache-Control: no-store.

Testing

  • Ran npm run lint (completed with existing warnings) and npm run test (failed due to unrelated test environment module resolution error: Cannot find module '@/lib/db').

Codex Task

@vercel

vercel Bot commented Feb 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cryptopaymap-v2 Ready Ready Preview, Comment Feb 24, 2026 6:46am

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant