How to make Java honor the DNS Caching Timeout?

Per Byron’s answer, you can’t set networkaddress.cache.ttl or networkaddress.cache.negative.ttl as System Properties by using the -D flag or calling System.setProperty because these are not System properties – they are Security properties. If you want to use a System property to trigger this behavior (so you can use the -D flag or call System.setProperty), you will … Read more