That is very cool, i used to use GRC.com tool for that purpose on windows. Just a small note, looking at the script: resolvectl service is not the default resolver on a new manjaro install, so this part will not work.
P.s. according to this (read all of it) there is no cache by default, so it does not matter.