]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
layer/rrcache: re-enabled caching of volatile records
authorMarek Vavruša <marek.vavrusa@nic.cz>
Sun, 28 Jun 2015 23:55:24 +0000 (01:55 +0200)
committerMarek Vavruša <marek.vavrusa@nic.cz>
Sun, 28 Jun 2015 23:55:24 +0000 (01:55 +0200)
lib/defines.h
lib/layer/rrcache.c

index 02fe002ab41cd517ced50027dfbe4cfdde9657f7..017a14087e935188514c59408b04429dc92514ef 100644 (file)
 #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.
  */
index 1a6336506ff2898ee6ed6f5c7a36700b4e68f7bb..db0687851f6cf03159d0cf2ba7759e68f704feee 100644 (file)
@@ -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 */