Skip to content

Refresh chatbot data as soon as Airtable changes#480

Merged
bryceerobertson merged 1 commit into
mainfrom
chatbot-data-cache-invalidation
Jul 22, 2026
Merged

Refresh chatbot data as soon as Airtable changes#480
bryceerobertson merged 1 commit into
mainfrom
chatbot-data-cache-invalidation

Conversation

@bryceerobertson

Copy link
Copy Markdown
Member
  • The chatbot and search index read Airtable through a shared runtime data cache that only refreshed hourly, so the bot could tell users a listing doesn't exist while the site pages (rebuilt within ~2-3 min) already showed it. Seen today with the Torchbearer Community map record.
  • Tags the fetchAirtableRecords cache (airtable-records) and has /api/check-rebuild invalidate that tag the minute it detects an Airtable change, using Next 16's revalidateTag(tag, 'max') stale-while-revalidate mode.
  • The invalidation runs before the deploy-hook cooldown checks, so runtime data stays fresh even if the deploy hook is rate-limited or broken.
  • Net effect: the bot now lags an Airtable edit by ~1-6 minutes (1-min cron + its 5-min in-memory catalog snapshot) instead of up to ~65 minutes.
  • Verification after deploy: edit a published record's visible field in Airtable, then ask the chatbot about it a few minutes later.

🤖 Generated with Claude Code

The chatbot catalog and search index read Airtable through a shared data
cache that only refreshes hourly, so the bot could deny listings the site
pages already showed. check-rebuild now tags that cache and invalidates it
the minute a change is detected, before the deploy-hook cooldowns, so
runtime data stays fresh even when a rebuild can't fire.

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

vercel Bot commented Jul 22, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
ai-safety-com Ready Ready Preview, Comment Jul 22, 2026 4:31am

Request Review

@bryceerobertson
bryceerobertson merged commit a459fa0 into main Jul 22, 2026
2 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