```scala
cacheMetrics.get(scope) getOrElse {
  val metric = newMetric(scope)
  cacheMetrics += scope -> metric
  metric
}
```