Many users are setting networkaddress.cache.ttl as a system property [1]. This has no effect - this is a security property, and is only read from java.security file.
The property is listed on the list of system properties [2], along with networkaddress.cache.stale.ttl and networkaddress.cache.negative.ttl, which are only used as security properties as well.
Other than that, our documents mention that this is a security property [3] [4], and not a system property, but it's not easy to find information on how security properties can be set. We could probably add a link to the Security class documentation [5], which at least mentions the java.security file.
[1] https://mail.openjdk.org/pipermail/net-dev/2024-January/022653.html
[2] https://docs.oracle.com/en/java/javase/21/docs/api/system-properties.html
[3] https://docs.oracle.com/en/java/javase/20/docs/api/java.base/java/net/InetAddress.html#inetaddress-caching-heading
[4] https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/net/doc-files/net-properties.html#networkaddress.cache.ttl
[5] https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/security/Security.html
The property is listed on the list of system properties [2], along with networkaddress.cache.stale.ttl and networkaddress.cache.negative.ttl, which are only used as security properties as well.
Other than that, our documents mention that this is a security property [3] [4], and not a system property, but it's not easy to find information on how security properties can be set. We could probably add a link to the Security class documentation [5], which at least mentions the java.security file.
[1] https://mail.openjdk.org/pipermail/net-dev/2024-January/022653.html
[2] https://docs.oracle.com/en/java/javase/21/docs/api/system-properties.html
[3] https://docs.oracle.com/en/java/javase/20/docs/api/java.base/java/net/InetAddress.html#inetaddress-caching-heading
[4] https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/net/doc-files/net-properties.html#networkaddress.cache.ttl
[5] https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/security/Security.html