From: Bert Hubert Date: Mon, 30 Jun 2008 16:55:49 +0000 (+0000) Subject: do less cache pruning and counting X-Git-Tag: rec-3.2~294 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56c0d5bd70995f8db9efd812d8210b2fe449fc60;p=thirdparty%2Fpdns.git do less cache pruning and counting git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1228 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/pdns/packetcache.cc b/pdns/packetcache.cc index e0bb1c7851..e9f81f6846 100644 --- a/pdns/packetcache.cc +++ b/pdns/packetcache.cc @@ -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;