Add cacheKey function and tests to TreeRepository + typo fix

Bug: 60152
Change-Id: I4136c008cdd8ae3b42efcb1610529257e4875aec
Merge "Add cacheKey function and tests to TreeRepository + typo fix"