Add a flag for disabling the logging of cache metrics

@stig