AuthDomainCache::AuthDomainCache(size_t mapsCount) :
d_maps(mapsCount)
{
- S.declare("domain-cache-hit", "Number of hits on the domain cache");
- S.declare("domain-cache-miss", "Number of misses on the domain cache");
+ S.declare("domain-cache-hit", "Number of domain cache hits");
+ S.declare("domain-cache-miss", "Number of domain cache misses");
S.declare("domain-cache-size", "Number of entries in the domain cache", StatType::gauge);
d_statnumhit = S.getPointer("domain-cache-hit");
{
WriteLock globalLock(d_mut);
if (d_replacePending) {
- // add/replace all domains created while data collection for replace() was already running.
+ // add/replace all domains created while data collection for replace() was already in progress.
for (const tuple<DNSName, int>& tup : d_pendingAdds) {
const DNSName& domain = tup.get<0>();
CacheValue val;
::arg().set("cache-ttl","Seconds to store packets in the PacketCache")="20";
::arg().set("negquery-cache-ttl","Seconds to store negative query results in the QueryCache")="60";
::arg().set("query-cache-ttl","Seconds to store query results in the QueryCache")="20";
- ::arg().set("domain-cache-ttl","Seconds to cache list of known domains")="0";
+ ::arg().set("domain-cache-ttl", "Seconds to cache list of known domains") = "0";
::arg().set("server-id", "Returned when queried for 'id.server' TXT or NSID, defaults to hostname - disabled or custom")="";
::arg().set("default-soa-content","Default SOA content")="a.misconfigured.dns.server.invalid hostmaster.@ 0 10800 3600 604800 3600";
::arg().set("default-soa-edit","Default SOA-EDIT value")="";
uint32_t secpollSince = 0;
uint32_t domainCacheUpdateSince = 0;
for(;;) {
- const uint32_t slept = g_domainCache.getTTL() == 0 ? secpollInterval : std::min(secpollInterval, g_domainCache.getTTL());
- sleep(slept); // if any signals arrive, we might run more often than expected.
+ const uint32_t sleeptime = g_domainCache.getTTL() == 0 ? secpollInterval : std::min(secpollInterval, g_domainCache.getTTL());
+ sleep(sleeptime); // if any signals arrive, we might run more often than expected.
- domainCacheUpdateSince += slept;
+ domainCacheUpdateSince += sleeptime;
if (domainCacheUpdateSince >= g_domainCache.getTTL()) {
try {
UeberBackend B;
}
}
- secpollSince += slept;
+ secpollSince += sleeptime;
if (secpollSince >= secpollInterval) {
secpollSince = 0;
try {
int zoneId{-1};
if(cachedOk && g_domainCache.isEnabled()) {
if (g_domainCache.getEntry(shorter, zoneId)) {
- // Zone exists in domain cache, directly lookup SOA.
+ // Zone exists in domain cache, directly look up SOA.
// XXX: this code path and the cache lookup below should be merged; but that needs the code path below to also use ANY.
// Or it should just also use lookup().
DNSZoneRecord zr;