From: Bert Hubert Date: Wed, 15 Mar 2006 18:06:30 +0000 (+0000) Subject: bring cache pruning in line (once a minute) X-Git-Tag: pdns-2.9.20~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97bb160b9e46f637b246a7a5986a0230c7a5afba;p=thirdparty%2Fpdns.git bring cache pruning in line (once a minute) git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@584 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index 03ff924d7b..80d4414848 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -24,6 +24,7 @@ #ifndef WIN32 #include #endif // WIN32 +#include "recursor_cache.hh" #include #include #include @@ -47,7 +48,7 @@ #include "zoneparser-tng.hh" using namespace boost; -#include "recursor_cache.hh" + #ifdef __FreeBSD__ // see cvstrac ticket #26 #include @@ -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();