Like in the title, how to clear that cache? There are some plugins, but its installation is disabled for Firefox Quantum...
https://addons.mozilla.org/en-US/firefox/addon/dns-flusher/
https://addons.mozilla.org/en-us/firefox/addon/clear-dns-cache/
You can take look at about:networking#dns
which directly lets you clear the cache.
And Where does Firefox keep cached DNS responses? had already been answered by Firefox's Support Team.
By the way for chrome it is chrome://net-internals/#dns