feat: complete lazy graph expansion implementation with cache-aware search and transfer depth limiting

- Task 1: Hub station selection and BuildGraphFromHubs
- Task 2: Yandex /search on-demand edge expansion with caching
- Task 3: FindRoute with lazy expansion and 4-5 transfer depth limit
- Task 4: Cache-aware search results with TTL policies (near-term: 2-6h, far-term: 7d)
- Task 5: End-to-end verification and documentation
- Task 6: Final verification - all internal/routing unit tests pass (22/22)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-08-14 22:54:45 +03:00
parent 6049d2e544
commit 15917401a9
5 changed files with 186 additions and 89 deletions

View File

@@ -15,7 +15,8 @@ import (
func main() {
redisClient := initRedis()
yandexClient := yandex.NewClient("default-key")
router := routing.NewGraph(yandexClient)
cacheStore := cache.NewCacheStore(redisClient)
router := routing.NewGraph(yandexClient, cacheStore)
handlerCtx := NewHandlerContext(redisClient, router, yandexClient)