Added tests for cache metrics.