I wouldn't want to keep a cache. But if you look at the call sites of vm_ip you will see that some call it in a loop to get the IP for many VMs. In those cases you are likely to fetch the VM list from the same host multiple times. If we could make vm_ip take a list of VMs rather than a single one, then you could optimize this. The callers that only call it once won't need to change much, but the callers that currently call it multiple times could now call it once with a list of VMs.