From: Marek VavruĊĦa Date: Sun, 28 Jun 2015 23:55:24 +0000 (+0200) Subject: layer/rrcache: re-enabled caching of volatile records X-Git-Tag: v1.0.0-beta1~98 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=542a8f3db9561d0008d0034d0f2583e9c9f80f43;p=thirdparty%2Fknot-resolver.git layer/rrcache: re-enabled caching of volatile records --- diff --git a/lib/defines.h b/lib/defines.h index 02fe002ab..017a14087 100644 --- a/lib/defines.h +++ b/lib/defines.h @@ -35,11 +35,6 @@ #define KR_CONN_RTT_MAX 3000 /* Timeout for network activity */ #define KR_ITER_LIMIT 50 /* Built-in iterator limit */ -/* - * Timers. - */ -#define KR_TTL_GRACE ((KR_CONN_RTT_MAX) / 1000) /* TTL expire grace period. */ - /* * Defines. */ diff --git a/lib/layer/rrcache.c b/lib/layer/rrcache.c index 1a6336506..db0687851 100644 --- a/lib/layer/rrcache.c +++ b/lib/layer/rrcache.c @@ -119,7 +119,7 @@ static int commit_rr(const char *key, void *val, void *data) { knot_rrset_t *rr = val; struct stash_baton *baton = data; - if (knot_rrset_ttl(rr) < KR_TTL_GRACE) { + if (knot_rrset_ttl(rr) < 1) { return kr_ok(); /* Ignore cache busters */ } /* Check if already cached */