Skip to content

Commit ca86b5a

Browse files
committed
Speeds up webhook event loading with LRU cache
Introduces a backend in-memory cache with TTL and LRU to serve webhook events instantly and reduce storage reads. Returns stale data immediately and refreshes in the background; merges new webhook events into the cache on write. Integrates with SSE to notify clients when cache refresh completes for seamless UI updates. Adds monitoring and management endpoints for cache stats and per-path clearing. Updates technical docs and index. Cuts cached response time to ~5–15ms (~99% faster) while keeping memory bounded and providing graceful fallback.
1 parent 643a584 commit ca86b5a

File tree

5 files changed

+1296
-1
lines changed

5 files changed

+1296
-1
lines changed

docs/technical/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- [Hole Image Display](./HOLE_IMAGE_DISPLAY.md) - Visual hole layout images in course info banner
1414
- [Shot Trajectory Visualization](./SHOT_TRAJECTORY_VISUALIZATION.md) - 3D→2D shot path overlay on hole images
1515
- [Auto-Save Feature](./AUTO_SAVE_FEATURE.md) - Browser cache persistence to prevent data loss
16+
- [Webhook Event Backend Cache](./WEBHOOK_CACHE_BACKEND.md) - In-memory LRU cache for instant webhook event loading
1617

1718
### Bug Fixes & Improvements
1819
- [Shot Number Carry-Forward Fix](./SHOT_NUMBER_CARRY_FORWARD_FIX.md) - Making hole/shot persist across events

0 commit comments

Comments
 (0)