What version of libvirt are you using which exhibits this behaviour ? Libvirt will cache the results of querying QEMU so repeated calls to getCapabilities should not cause any problems, unless you have a fairly old libvirt.
What version of libvirt are you using which exhibits this behaviour ? Libvirt will cache the results of querying QEMU so repeated calls to getCapabilities should not cause any problems, unless you have a fairly old libvirt.