summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/coremods/core_dns.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/coremods/core_dns.cpp b/src/coremods/core_dns.cpp
index 3412ec611..2e75a591f 100644
--- a/src/coremods/core_dns.cpp
+++ b/src/coremods/core_dns.cpp
@@ -682,16 +682,22 @@ class MyManager : public Manager, public Timer, public EventHandler
bool Tick(time_t now) CXX11_OVERRIDE
{
- ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "cache: purging DNS cache");
-
+ unsigned long expired = 0;
for (cache_map::iterator it = this->cache.begin(); it != this->cache.end(); )
{
const Query& query = it->second;
if (IsExpired(query, now))
+ {
+ expired++;
this->cache.erase(it++);
+ }
else
++it;
}
+
+ if (expired)
+ ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "cache: purged %lu expired DNS entries", expired);
+
return true;
}