device-manager: Keep a cache of the highest priority devices for each role.