commit | 1d860415f2eaf4f26a31b2feb141b8972ef38f0c | [log] [tgz] |
---|---|---|
author | Simon Kelley <simon@thekelleys.org.uk> | Thu Sep 20 20:48:04 2012 +0100 |
committer | Simon Kelley <simon@thekelleys.org.uk> | Thu Sep 20 20:48:04 2012 +0100 |
tree | 6502d82e181a43eac3146dc4489cf245455908aa | |
parent | 289a253569f48ded3b0f72b5f29ddeda8a85224e [diff] [blame] |
Add --max-cache-ttl option.
diff --git a/src/cache.c b/src/cache.c index ee4e763..ddbc5c0 100644 --- a/src/cache.c +++ b/src/cache.c
@@ -371,6 +371,9 @@ int freed_all = flags & F_REVERSE; int free_avail = 0; + if(daemon->max_cache_ttl < ttl) + ttl = daemon->max_cache_ttl; + /* Don't log keys */ if (flags & (F_IPV4 | F_IPV6)) log_query(flags | F_UPSTREAM, name, addr, NULL);