Skip to content

Commit

Permalink
Simplify language and fix spelling
Browse files Browse the repository at this point in the history
Include example algorithm.
  • Loading branch information
da2x committed Feb 18, 2019
1 parent aa298a1 commit 110edef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion proposals/0005-dns.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ Name cache entries have four qualifiers: origin (domain name : port), Dat key, f
- If the two keys differ, then the cached key is replaced: set the current time to the first seen timestamp, and set the expiration timestamp to exactly 30 minutes.
- If the two keys are identical, renew the cache expiration timestamp using the following algorithm:

`currentTime + max(30min, min(TTL, min(6months, (firstSeen - currentTime) * 2)))`
`currentTime + max(30min, min(TTL, min(6months, (currentTime - firstSeen) * 2)))`
- Compare these two numbers and choose the smaller. First number: Subtract the first seen timestamp from the current time and multiply by two; add the resulting number to the current timestamp. Second number: add the resolved TTL to the current time.
- Adjust the number to be at least 30 minutes in the future and no more than 6 months.
- Set the resulting number as the new expiration timestamp.
Expand Down

0 comments on commit 110edef

Please sign in to comment.