The gnome-software has a dedicated function to refresh metadata, it's usually ran on start of the application, but can be also executed when needed. The function takes one argument, the `cache_age` in seconds. Caches not being that old are automatically skipped for the refresh. An explicit refresh can help to speed up execution of the following commands, the same as when the refresh happens during the dedicated time it's much better experience for the users. A side note: the first time I ran the dnf5daemon-server and connected to it to list installed packages the dnf5daemon-server realized it has no/stale cache and begun to refresh the repository information. I have installed quite few repos, thus it took longer to download all the repo information. It took as much as the D-Bus call timed out. That led me to set unlimited time for the D-Bus calls to the dnf5daemon-server to avoid any such problem in the future.
This bug appears to have been reported against 'rawhide' during the Fedora Linux 38 development cycle. Changing version to 38.
I just tested dnfdaemon again in https://issues.redhat.com/browse/COCKPIT-952 , and am happy to report that all crashes that I previously ran into now got fixed, thanks! So this missing API is the remaining gap which blocks us from moving to dnfdaemon in Cockpit.
It seems the 5.1.0 has `read_all_repos` method on the `org.rpm.dnf.v0.Base` interface. It does not contain the "cache_age" argument (in fact it has no argument at all), but if it's the way to go, then why not. I think this can be closed, unless someone is willing to add the "cache_age" argument.