It’s simple, just run:

dscacheutil -flushcache

From the terminal