[Asterisk-code-review] Add a negative DNS cache (asterisk[13])

Kevin Harwell asteriskteam at digium.com
Tue Dec 1 13:47:21 CST 2015


Kevin Harwell has posted comments on this change.

Change subject: Add a negative DNS cache
......................................................................


Patch Set 2:

(1 comment)

https://gerrit.asterisk.org/#/c/1709/2/main/dns_cache.c
File main/dns_cache.c:

Line 152: 	return time(NULL) > item->ttl ? CMP_MATCH : 0;
> I'm not sure I agree with this. You really have two times:
I don't think in this case the last accessed time needs to be specifically tracked.

The background task exists to remove expired items that have not been accessed in a while (at most 5 min) from the cache. If the entry is accessed frequently then upon reaching expiration it will be removed before this task can remove it, or it will be updated, extending the expiration, thus keeping the entry in the cache.


-- 
To view, visit https://gerrit.asterisk.org/1709
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Icb9f8c7ec15eedd4701461bf865e8036a5732388
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list