From: Francis Dupont Date: Tue, 30 Apr 2019 16:11:58 +0000 (+0200) Subject: [587-radius-host-cache-do-not-work] Re-add host cache in createManagers which is... X-Git-Tag: Kea-1.6.0-beta~173 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=91d406dcbe001d3299ce14f3a1837b11884308dc;p=thirdparty%2Fkea.git [587-radius-host-cache-do-not-work] Re-add host cache in createManagers which is called after hook loads --- diff --git a/src/lib/dhcpsrv/cfg_db_access.cc b/src/lib/dhcpsrv/cfg_db_access.cc index 333bd557eb..b004a64350 100644 --- a/src/lib/dhcpsrv/cfg_db_access.cc +++ b/src/lib/dhcpsrv/cfg_db_access.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2016-2018 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2016-2019 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this @@ -60,6 +60,13 @@ CfgDbAccess::createManagers() const { // Recreate host data source. HostMgr::create(); + + // Restore the host cache. + if (HostDataSourceFactory::registeredFactory("cache")) { + HostMgr::addBackend("type=cache"); + } + + // Add database backends. std::list host_db_access_list = getHostDbAccessStringList(); for (std::string& hds : host_db_access_list) { HostMgr::addBackend(hds);