I looked there some time ago, and raised the related ticket https://issues.apache.org/jira/browse/OAK-2777. I didn't continue further on this because I've seen caching is on the roadmap.
I think the ReferenceIndex is a good candidate to start with. It definitely can help with Repository.login queries. Regards, Przemo Pakulski
