Add some logging of dns cache operations

Added info about what entries are getting flushed due to ttl or size limits.

Change-Id: I69fb70ce23b5b820f5f1a5738c0f1aa57b6a1127
This commit is contained in:
Robert Greenwalt 2011-09-02 07:44:36 -07:00
parent 96e5faccdc
commit 7f84da69f8

View File

@ -1405,6 +1405,10 @@ _cache_remove_oldest( Cache* cache )
XLOG("%s: OLDEST NOT IN HTABLE ?", __FUNCTION__);
return;
}
if (DEBUG) {
XLOG("Cache full - removing oldest");
XLOG_QUERY(oldest->query, oldest->querylen);
}
_cache_remove_p(cache, lookup);
}
@ -1453,6 +1457,7 @@ _resolv_cache_lookup( struct resolv_cache* cache,
/* remove stale entries here */
if (now >= e->expires) {
XLOG( " NOT IN CACHE (STALE ENTRY %p DISCARDED)", *lookup );
XLOG_QUERY(e->query, e->querylen);
_cache_remove_p(cache, lookup);
goto Exit;
}