You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SiteRouteResolver.ResolveAsync handles a URL that names a content (/blog/my-trip) by calling IPageRepository.GetRoutableListAsync(), which loads every active page in the tenant on every such request, then walks them testing route prefixes.
That is correct but unbounded: the cost of resolving one URL grows with the number of pages on the site. Only the exact-route-match path (step 1) avoids it.
The page collection is close to read-only in normal operation — pages change when someone edits the site structure, not when content is published — so it is a good caching candidate.
What to do
Cache the routable page list per tenant (IDistributedCache<T>), keyed by tenant id.
Invalidate on page create / update / delete. PageManager is the single write path, so that is where invalidation belongs.
Keep the ordering guarantee: longest route first. That ordering is load-bearing — it is what stops /blog from claiming /blog-archive/..., and it is covered by tests today.
Activity