PortalSiteMapProvider.TryGetRootNode property

Gets the root node only if it is cached.

Namespace:  Microsoft.SharePoint.Publishing.Navigation
Assembly:  Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)

public PortalSiteMapNode TryGetRootNode { get; }

Property value

Type: Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapNode
A reference to the root PortalSiteMapNode portal. Returns a null reference (Nothing in Visual Basic) if the root Web site is not cached.

Use this property for Search and other functions and Features that can use a cached value if one exists, but when you do not want to create more workload by loading the cached value onto sites that are not portal sites.