TTL tweaks
I've been reluctant to do (some of) these changes in a patch-version update, so this has been hibernating, but let me open a MR already.
Fixes #127 (closed); fixes #736 (closed). (and other TTL-related changes)
The earlier choice was applying TTL bounds only when caching. That makes some sense from implementation point of view, but I can't see any motivation to behave that way and treat the first answer differently.
Merge request reports
Activity
- Resolved by Oto Šťáva
So now, when I set e.g.
config.min_ttl(1000)
, TTL stays on 1000 on repeated queries as well. Is that the behaviour we want?I personally expected this to fix the queries that caused new records to be inserted into cache, so that even that first answer has TTL modified by
min_ttl
andmax_ttl
(instead of it being the upstream value), but subsequent queries would still count down, as it was before. Now, we're delaying updates of downstream resolvers, so that even when kresd only has a few seconds remaining on a cached record, the downstream resolver will still potentially cache it formin_ttl
amount of time. The way I see it that might or might not be the desired behaviour depending on what the user wants to achieve.
- Resolved by Vladimír Čunát
There are still some issues in behavior, which is why I left it marked as draft.
added 88 commits
-
882e0587...48451459 - 84 commits from branch
master
- adc65785 - lib/cache: tweak TTL computation for packets
- eae7c327 - cache.max_ttl(): lower the default from six days to one day
- ae1a64f1 - TTL bounds: improve the logic
- 8ce35c3f - NEWS + doc about TTL: apply changes from previous commits
Toggle commit list-
882e0587...48451459 - 84 commits from branch
mentioned in commit 7ad8b83b
mentioned in merge request !1369 (merged)