+ // This will return entries that are beyond their cache period,
+ // but not beyond their validity unless that criteria option was set.
+ // If it is a cache-expired entry, bump the cache period to prevent retries.
+ if (entity.first) {
+ time_t cacheExp = 600;
+ if (entity.first->getCacheDuration())
+ cacheExp = min(m_maxCacheDuration, entity.first->getCacheDurationEpoch());
+ cacheExp = max(cacheExp, 60);
+ m_cacheMap[entity.first->getEntityID()] = time(nullptr) + cacheExp;
+ }