fn cache_legacy_mode( cache: &DashMap<String, bool>, names: &[String], is_legacy: bool, ) -> Result<()>