For Firefox, open the link below:
and click “I’ll be careful, I promise!“,
and find network.dnsCacheExpiration, set its value to 0 (create one if it didn’t exist).
Now the cache should be flushed, and set network.dnsCacheExpiration back to 3600, or you the cache will not work at all.
Operating system level:
Mac OS X(after 10.5):