
When searching for the networkaddress.cache.* values java will default to these values when it can't find a manually set value, however if a security manager is in place then as a special case java will set the cache lifetime to infinite. Manually setting the values solves this issue.