Changeset 1504

Show
Ignore:
Timestamp:
01/20/10 22:39:52 (3 years ago)
Author:
ahu
Message:

add max packet cache size + silence warning

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/pdns/pdns/pdns_recursor.cc

    r1502 r1504  
    10431043  Utility::gettimeofday(&now, 0); 
    10441044 
    1045   if(now.tv_sec - last_prune > 300 + 3*t_id) {  
     1045  if(now.tv_sec - last_prune > (time_t)(300 + 3*t_id)) {  
    10461046    DTime dt; 
    10471047    dt.setTimeval(now); 
    10481048    t_RC->doPrune(); // this function is local to a thread, so fine anyhow 
    1049     t_packetCache->doPruneTo(); 
     1049    t_packetCache->doPruneTo(::arg().asNum("max-packetcache-entries")); 
    10501050     
    10511051    typedef SyncRes::negcache_t::nth_index<1>::type negcache_by_ttd_index_t; 
     
    18611861    ::arg().set("max-cache-ttl", "maximum number of seconds to keep a cached entry in memory")="86400"; 
    18621862    ::arg().set("packetcache-ttl", "maximum number of seconds to keep a cached entry in packetcache")="3600"; 
     1863    ::arg().set("max-packetcache-entries", "maximum number of seconds to keep a cached entry in packetcache")="500000"; 
    18631864    ::arg().set("packetcache-servfail-ttl", "maximum number of seconds to keep a cached servfail entry in packetcache")="60"; 
    18641865    ::arg().set("server-id", "Returned when queried for 'server.id' TXT or NSID, defaults to hostname")="";