From 91d406dcbe001d3299ce14f3a1837b11884308dc Mon Sep 17 00:00:00 2001 From: Francis Dupont Date: Tue, 30 Apr 2019 18:11:58 +0200 Subject: [PATCH] [587-radius-host-cache-do-not-work] Re-add host cache in createManagers which is called after hook loads --- src/lib/dhcpsrv/cfg_db_access.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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); -- 2.47.2