#include <XmlDnsblCache.h>
Public Member Functions | |
XmlDnsblCache (const std::string &path, const std::string &dnsblname="") | |
~XmlDnsblCache () | |
void | setValidity (int hours) |
int | getValidity () const |
Result | get (const Url &what, std::string *comments=NULL) const throw (cache_miss) |
void | put (const Url &what, Result entry, const std::string *comments=NULL) |
void | save (const std::string &name="") throw (std::runtime_error) |
Private Types | |
typedef std::map< Url, Entry > | CacheMap |
Private Member Functions | |
std::string | writeDateTime (time_t time) const |
time_t | readDateTime (const std::string &fmt) const |
Private Attributes | |
CacheMap | m_map |
int | m_validity |
time_t | m_lastvalid |
std::string | m_name |
std::string | m_dnsblName |
Static Private Attributes | |
static const int | DEFAULT_VALIDITY = 10*24 |
Classes | |
struct | Entry |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|