On Fri, 28 Apr 2023 15:13:35 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:
>> src/java.base/share/classes/sun/net/InetAddressCachePolicy.java line 130: >> >>> 128: staleCachePolicy = (int) Math.max(tmp, max); >>> 129: } >>> 130: } >> >> Maybe there was discussion of this which I missed, but this seems to be >> saying if the cache policy is less than seven days, then the stale policy is >> set no less than seven days. What is the reason for that? I think it would >> need to be documented if we stick with it. > > It is come from the recommendation in the "RFC 8767" see the notion about > "cap of 7 days": > https://www.rfc-editor.org/rfc/rfc8767 > Depending on the final implementation I can document this, or delete it in > the code. >From what I can see RFC8767 recommends a cap of 7 days for the TTL itself - >that is a maximum value for `cachePolicy` rather than `staleCachePolicy`. It >seems to say the the stale timer should be configurable with the text: "The >suggested value is between 1 and 3 days". Personally, I would drop this part >of the change. Such suggestions can be adopted (or not) by end users in my >opinion. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13285#discussion_r1183726891