A late answer to be sure, but I found this solution worked better than the accepted answer. In my scenario I am testing SQL connections, and I couldn't apply the existing answer since I have no request.KeepAlive to set.. This page by Brian Mancini ("derp turkey") details his adventure in clearing the DNS cache. Full props to him, I'm just adding his solution here:

Apr 18, 2018 Flush DNS: why & how to clear your DNS cache [+ commands Aug 20, 2018 How to Clear Windows DNS Cache (Server & Workstations)

c# - How do I clear System.Net client DNS cache? - Stack

May 25, 2020

The Firefox cache temporarily stores images, scripts, and other parts of websites you visit in order to speed up your browsing experience. This article describes how to clear the cache. To clear your history (cookies, browsing history, cache, etc.) all at once, see Delete …

How to Clear & Flush DNS Cache on iPhone & iPad