Skip to content

feat(#148): add Redis caching layer for delivery ETA calculations - #160

Merged
Tybravo merged 2 commits into
SwiftChainn:mainfrom
spiffamani:feat/redis-cache-eta
Aug 28, 2026
Merged

feat(#148): add Redis caching layer for delivery ETA calculations#160
Tybravo merged 2 commits into
SwiftChainn:mainfrom
spiffamani:feat/redis-cache-eta

Conversation

@spiffamani

Copy link
Copy Markdown

Summary

  • Cache ETA results in Redis using geohash-based keys with configurable TTL.
  • Check cache before calling Google Maps / Haversine fallback to reduce external API costs.
  • Add Redis to docker-compose, wire server startup/shutdown, and mount the ETA route at /api/v1/deliveries/:id/eta.

Closes #148

Test plan

  • pnpm exec jest tests/routingService.test.ts --runInBand (7 tests passed)
  • Start Redis + server, hit /api/v1/deliveries/:id/eta twice — second call should be faster (cache hit in logs)
  • Confirm cache miss still returns valid ETA from DB delivery coordinates

…lations

Cache ETA results in Redis using geohash-based keys with configurable TTL, check cache before external routing APIs, and wire Redis into docker-compose and server startup.

Co-authored-by: Cursor <[email protected]>
@drips-wave

drips-wave Bot commented Aug 28, 2026

Copy link
Copy Markdown

@spiffamani Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Tybravo
Tybravo merged commit 1f2a5d2 into SwiftChainn:main Aug 28, 2026
1 check failed
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.

[Enhancement] Implement a Redis caching layer for the Delivery ETA calculations

2 participants