}
bool
-HostDataSourceFactory::del(HostDataSourceList& sources, const string& db_type) {
+HostDataSourceFactory::del(HostDataSourceList& sources,
+ const string& db_type) {
for (auto it = sources.begin(); it != sources.end(); ++it) {
if ((*it)->getType() != db_type) {
continue;
ConstHostPtr host = getCfgHosts()->get4(subnet_id, identifier_type,
identifier_begin, identifier_len);
- // Found it the config file or there are no backends configured?
+ // Found it in the config file or there are no backends configured?
// Then we're done here.
if (host || alternate_sources_.empty()) {
return (host);
.arg(subnet_id)
.arg(Host::getIdentifierAsText(identifier_type, identifier_begin,
identifier_len));
+ // @todo: remove this
if (negative_caching_) {
cacheNegative(subnet_id, SubnetID(0),
identifier_type, identifier_begin, identifier_len);
.arg(Host::getIdentifierAsText(identifier_type, identifier_begin,
identifier_len));
+ // @todo: remove this
if (negative_caching_) {
cacheNegative(SubnetID(0), subnet_id,
identifier_type, identifier_begin, identifier_len);
protected:
/// @brief The negative caching flag.
///
- /// When true and the first cache source will be also
- /// caching negative answers. This works for get[46]
- /// for a subnet and an identifier.
+ /// When true and the first backend is a cache
+ /// negative answers are inserted in the cache.
+ /// This works for get[46] for a subnet and an identifier.
bool negative_caching_;
/// @brief Cache an answer.