Write cache stats to info log (fine) when value is requested

The cache used in FindOwners is problematic from a system and code
health perspective. It caches state keyed by GitRepositoryManager (a
service object) and keeps a lot of mutable state that can lead to races
or hard to debug issues.

The cache is very short-lived (30s for most instances), so we want to
know if we can just remove it. Unfortunately, the whole plugin doesn't
use the Injector correctly, so we can't just inject a MetricMaker. We
could make the PrologEnvironment expose a MetricMaker, but this seems
like a one-off use case that is better treated with a simpler solution.

Therefore, this commit just logs cache stats at fine whenever a value is
accessed.

Change-Id: Ib1620dbb1b22b2c8ad5991b6ab0b54e40063a3ee
1 file changed
tree: 514715c7c9df0b9124327f6fa7a2960cdebe6006
  1. src/
  2. BUILD
  3. LICENSE
  4. OWNERS