internal static bool NodeExists(string path)
{
if (path == null)
{
throw new ArgumentNullException("path");
}
if (!CanExistInDatabase(path))
{
return(false);
}
// Look at the cache first
var pathKey = DataBackingStore.CreateNodeHeadPathCacheKey(path);
if (DistributedApplication.Cache.Get(pathKey) as NodeHead != null)
{
return(true);
}
// If it wasn't in the cache, check the database
return(DataProvider.NodeExists(path));
}