I know linked lists are the work of the devil, but it makes sense here.
Change the map in the DotClangTidyTree to store the FileCache as well as a link to its parent FileCache.
By storing a pointer to each items parent in the map, we no longer need to traverse the entire directory tree and populating a vector for each item.
Instead we just grab the tail from the map and (in all but the first run) it will contain links to the whole directory structure we need for querying.
This can save a lot of redundant work if the config file was in the tail directory but there was 15 parent directories above it.