diff --git a/packages/router-core/src/new-process-route-tree.ts b/packages/router-core/src/new-process-route-tree.ts index e10be41c84..1df04461cc 100644 --- a/packages/router-core/src/new-process-route-tree.ts +++ b/packages/router-core/src/new-process-route-tree.ts @@ -535,7 +535,7 @@ export type ProcessedTree< /** a mini route tree generated from the flat `routeMasks` list */ masksTree: AnySegmentNode | null /** @deprecated keep until v2 so that `router.matchRoute` can keep not caring about the actual route tree */ - singleCache: Map> + singleCache: LRUCache> /** a cache of route matches from the `segmentTree` */ matchCache: LRUCache>> /** a cache of route matches from the `masksTree` */ @@ -675,7 +675,7 @@ export function processRouteTree< sortTreeNodes(segmentTree) const processedTree: ProcessedTree = { segmentTree, - singleCache: new Map(), + singleCache: createLRUCache>(1000), matchCache: createLRUCache< string, ReturnType>