Changeset 1204
- Timestamp:
- 06/17/08 23:33:18 (4 months ago)
- Files:
-
- trunk/pdns/pdns/docs/pdns.sgml (modified) (1 diff)
- trunk/pdns/pdns/rec_channel_rec.cc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/pdns/pdns/docs/pdns.sgml
r1203 r1204 139 139 </para> 140 140 </listitem> 141 <listitem> 142 <para> 143 <command>rec_control wipe-cache</command> now also wipes domains from the negative cache, hurrying up the expiry 144 of negatively cached records. Suggested by Simon Kirby, implemented in c1204. 145 </para> 146 </listitem> 147 141 148 <listitem> 142 149 <para> trunk/pdns/pdns/rec_channel_rec.cc
r1196 r1204 91 91 string doWipeCache(T begin, T end) 92 92 { 93 int count=0 ;94 for(T i=begin; i != end; ++i) 93 int count=0, countNeg=0; 94 for(T i=begin; i != end; ++i) { 95 95 count+=RC.doWipeCache(toCanonic("", *i)); 96 97 return "wiped "+lexical_cast<string>(count)+" records\n"; 96 string canon=toCanonic("", *i); 97 countNeg+=SyncRes::s_negcache.count(tie(canon)); 98 pair<SyncRes::negcache_t::iterator, SyncRes::negcache_t::iterator> range=SyncRes::s_negcache.equal_range(tie(canon)); 99 SyncRes::s_negcache.erase(range.first, range.second); 100 } 101 102 return "wiped "+lexical_cast<string>(count)+" records, "+lexical_cast<string>(countNeg)+" negative records\n"; 98 103 } 99 104