code: public static void setDNSCacheTime (final int nSeconds)
    {
      final String sValue = Integer.toString (nSeconds);
      Security.setProperty ("networkaddress.cache.ttl", sValue);
      Security.setProperty ("networkaddress.cache.negative.ttl", sValue);
      SystemProperties.setPropertyValue ("disableWSAddressCaching", nSeconds == 0);
    }
docs: Set special DNS client properties that have influence on the DNS client
  behavior. This method should be called as soon as possible on startup. In
  most cases it may be beneficiary if the respective system properties are
  provided as system properties on the commandline!
  
  @param nSeconds
  DNS client caching time in seconds.