Code cleanup.
Refactor/simplify the way we define and handle cache and cache-container metrics