|
Public Member Functions |
| Cache (const std::string &filename) throw (std::runtime_error) |
virtual | ~Cache () |
virtual CacheResult | get (const Url &url) const |
virtual void | addRir (const UrlRange &nr, const std::string &rir) throw (std::runtime_error) |
virtual void | add (const ZeWhois::WhoisList &lst) throw (std::runtime_error) |
virtual void | remove (const UrlRange &range) |
virtual const CacheMap & | getTree () const |
void | save () throw (std::runtime_error) |
Private Member Functions |
void | initTree () throw (std::runtime_error) |
void | checkVersion (const DocumentPtr &) throw (std::runtime_error) |
void | recursiveBuild (const NodeListPtr &elements, CacheMap &_map) const throw (std::runtime_error) |
CacheEntry * | createEntry (const ElementPtr &el) const throw (std::runtime_error) |
void | recursiveFind (const Url &url, const CacheMap &_map, CacheResult &cr) const throw (std::runtime_error) |
void | writeLock () |
Static Private Member Functions |
static UrlRange | getRange (const ElementPtr &el) throw (std::runtime_error) |
static CacheMap::const_iterator | fastfind (const UrlRange &range, const CacheMap &_map) |
static CacheMap::iterator | fastfind (const UrlRange &range, CacheMap &_map) |
static CacheMap::const_iterator | fastfind (const Url &url, const CacheMap &_map) |
static void | recursiveSave (ElementPtr &pEl, const CacheMap &_map) throw (std::runtime_error) |
static void | recursiveAdd (const UrlRange &range, const InternalCacheEntry *pEntry, CacheMap &_map) throw (std::runtime_error) |
static void | recursiveDelete (const UrlRange &range, CacheMap &_map) |
Private Attributes |
CacheMap | m_head |
std::string | m_filename |
std::string | m_path |
CriticalSection | m_mutex |
int | m_nReads |
bool | m_bDirty |