dnf makecache as root and set
metadata_expire=never at dnf.conf. Then dnf operations doesn’t try to update metadata when I run commands as root. But when I run then as ordinary user it tries update metadata again.
DNF uses a separate cache for each user under which it executes.