cache 'needs_db' flag for each metric