-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
Pre-populate cache for popular search queries to reduce cold start latency.
Overview
Use a cron trigger to periodically fetch and cache results for the top N most popular queries.
Implementation Notes
- Add cron trigger to wrangler.toml:
[triggers] crons = ["0 * * * *"] # Every hour
- Use D1 trending data to identify top 50 queries
- Pre-fetch search results for each query
- Store in Cloudflare Cache API
Approach
- Query D1 for top 50 queries from the last 7 days
- For each query, make internal search request
- Results get cached automatically via existing caching logic
- Log cache warming metrics
Acceptance Criteria
- Cron job runs hourly
- Top 50 queries are pre-cached
- Cache warming doesn't exceed rate limits
- Metrics logged for monitoring
- Tests added for cache warming logic
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request