Show
Ignore:
Timestamp:
03/31/06 08:46:58 (4 years ago)
Author:
ahu
Message:

implement very simple cache cache that catches repeated nearly identical lookups
appears to have lowered cpu load by 40%

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/pdns/pdns/recursor_cache.hh

    r623 r646  
    2525{ 
    2626public: 
     27  MemRecursorCache() : d_cachecachevalid(false) 
     28  {} 
    2729  unsigned int size(); 
    2830  unsigned int bytes(); 
     
    107109private: 
    108110  cache_t d_cache; 
    109  
     111  pair<cache_t::const_iterator, cache_t::const_iterator> d_cachecache; 
     112  string d_cachedqname; 
     113  bool d_cachecachevalid; 
    110114}; 
    111115