]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
do less cache pruning and counting
authorBert Hubert <bert.hubert@netherlabs.nl>
Mon, 30 Jun 2008 16:55:49 +0000 (16:55 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Mon, 30 Jun 2008 16:55:49 +0000 (16:55 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1228 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/packetcache.cc

index e0bb1c7851c5a75d00ebe6fc4e71084db117e179..e9f81f6846f507b4fbd848721465a243a2a350dc 100644 (file)
@@ -45,7 +45,7 @@ PacketCache::PacketCache()
 int PacketCache::get(DNSPacket *p, DNSPacket *cached)
 {
   extern StatBag S;
-  if(!((d_hit+d_miss)%15000)) {
+  if(!((d_hit+d_miss)%150000)) {
     cleanup();
   }
 
@@ -79,7 +79,7 @@ int PacketCache::get(DNSPacket *p, DNSPacket *cached)
       return 0;
     }
 
-    if(!((d_hit+d_miss)%1000)) {
+    if(!((d_hit+d_miss)%30000)) {
       *statnumentries=d_map.size(); // needs lock
     }
     string value;