]> granicus.if.org Git - pdns/commitdiff
update packetcache size in insert()
authorKees Monshouwer <mind04@monshouwer.org>
Mon, 26 Sep 2016 18:28:27 +0000 (20:28 +0200)
committermind04 <mind04@monshouwer.org>
Mon, 26 Sep 2016 18:28:27 +0000 (20:28 +0200)
pdns/packetcache.cc
regression-tests.nobackend/counters/expected_result

index cfc391593112cfa0c3c4af1536c0d00c4fa254fe..8a8f65a6ca759fa9fe2d10aa0de74049eab83146 100644 (file)
@@ -191,6 +191,8 @@ void PacketCache::insert(const DNSName &qname, const QType& qtype, CacheEntryTyp
 
     if(!success)
       mc.d_map.replace(place, val);
+    else
+      (*d_statnumentries)++;
   }
   else 
     S.inc("deferred-cache-inserts"); 
@@ -227,6 +229,8 @@ void PacketCache::insert(const DNSName &qname, const QType& qtype, CacheEntryTyp
 
     if(!success)
       mc.d_map.replace(place, val);
+    else
+      (*d_statnumentries)++;
   }
   else 
     S.inc("deferred-cache-inserts"); 
index cab576a7700f1b20bc299c0aeeef35e342250767..6eb97e6f2107f0a3ba1a8f6a8b4f79071e0b2619 100644 (file)
@@ -11,7 +11,7 @@ key-cache-size=0
 latency=0
 meta-cache-size=1
 overload-drops=0
-packetcache-size=0
+packetcache-size=8
 qsize-q=0
 rd-queries=0
 recursing-answers=0