]> granicus.if.org Git - pdns/commitdiff
bring cache pruning in line (once a minute)
authorBert Hubert <bert.hubert@netherlabs.nl>
Wed, 15 Mar 2006 18:06:30 +0000 (18:06 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Wed, 15 Mar 2006 18:06:30 +0000 (18:06 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@584 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/pdns_recursor.cc

index 03ff924d7bd6ca406c454a1db1fd2833e46be1c7..80d4414848ae1b1af29073d68acf2971619976e6 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef WIN32
 #include <netdb.h>
 #endif // WIN32
+#include "recursor_cache.hh"
 #include <stdio.h>
 #include <signal.h>
 #include <stdlib.h>
@@ -47,7 +48,7 @@
 #include "zoneparser-tng.hh"
 using namespace boost;
 
-#include "recursor_cache.hh"
+
 
 #ifdef __FreeBSD__           // see cvstrac ticket #26
 #include <pthread.h>
@@ -520,7 +521,7 @@ static void houseKeeping(void *)
 {
   static time_t last_stat, last_rootupdate, last_prune;
   time_t now=time(0);
-  if(now - last_prune > 300) { 
+  if(now - last_prune > 60) { 
     RC.doPrune();
     int pruned=0;
     for(SyncRes::negcache_t::iterator i = SyncRes::s_negcache.begin(); i != SyncRes::s_negcache.end();) 
@@ -672,7 +673,6 @@ int main(int argc, char **argv)
       ::arg().set("quiet")="no";
       
   }
-    
     makeClientSocket();
     makeUDPServerSockets();
     makeTCPServerSockets();