Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/router-core/src/new-process-route-tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ export type ProcessedTree<
/** a mini route tree generated from the flat `routeMasks` list */
masksTree: AnySegmentNode<TFlat> | null
/** @deprecated keep until v2 so that `router.matchRoute` can keep not caring about the actual route tree */
singleCache: Map<any, AnySegmentNode<TSingle>>
singleCache: LRUCache<string, AnySegmentNode<TSingle>>
/** a cache of route matches from the `segmentTree` */
matchCache: LRUCache<string, ReturnType<typeof findMatch<TTree>>>
/** a cache of route matches from the `masksTree` */
Expand Down Expand Up @@ -675,7 +675,7 @@ export function processRouteTree<
sortTreeNodes(segmentTree)
const processedTree: ProcessedTree<TRouteLike, any, any> = {
segmentTree,
singleCache: new Map(),
singleCache: createLRUCache<string, AnySegmentNode<any>>(1000),
matchCache: createLRUCache<
string,
ReturnType<typeof findMatch<TRouteLike>>
Expand Down
Loading