refactor metrics, add metrics cache support for probe