Skip to content

BUY-65260 add stale search read cache fallback - #268

Open
BuyWhere wants to merge 1 commit into
mainfrom
fix/BUY-65260-search-read-cache
Open

BUY-65260 add stale search read cache fallback#268
BuyWhere wants to merge 1 commit into
mainfrom
fix/BUY-65260-search-read-cache

Conversation

@BuyWhere

Copy link
Copy Markdown
Owner

Summary

  • add 24h stale Redis shadow entries for /v1/products/search responses
  • add normalized warm-query pointers for unfiltered head searches so replay variants can reuse a warm/stale response
  • count exact/stale responses as cache hits and expose X-Cache: STALE for fallback hits

Verification

  • npm run build
  • node --test --test-force-exit --test-name-pattern 'checks Redis cache before querying DB|stores result in Redis after DB query' tests/search.test.mjs tests/cache-stats.test.mjs
  • live pre-deploy probe (current prod) still shows cold multi-word searches at 6.76-10.11s, confirming the issue this PR targets before deployment

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
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