]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[587-radius-host-cache-do-not-work] Re-add host cache in createManagers which is... 587-radius-host-cache-do-not-work
authorFrancis Dupont <fdupont@isc.org>
Tue, 30 Apr 2019 16:11:58 +0000 (18:11 +0200)
committerFrancis Dupont <fdupont@isc.org>
Fri, 10 May 2019 07:56:13 +0000 (03:56 -0400)
src/lib/dhcpsrv/cfg_db_access.cc

index 333bd557eb47a52c2e29651fe9cf2de5eaea1423..b004a64350d7e012a7b023ef3170bd979fe32a9d 100644 (file)
@@ -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<std::string> host_db_access_list = getHostDbAccessStringList();
     for (std::string& hds : host_db_access_list) {
         HostMgr::addBackend(hds);