From 110edefa532cd1a1502ae38027d294fbe022b962 Mon Sep 17 00:00:00 2001 From: Daniel Aleksandersen Date: Mon, 18 Feb 2019 20:05:04 +0100 Subject: [PATCH] Simplify language and fix spelling Include example algorithm. --- proposals/0005-dns.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proposals/0005-dns.md b/proposals/0005-dns.md index e501bfb..e223937 100644 --- a/proposals/0005-dns.md +++ b/proposals/0005-dns.md @@ -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.