From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH v2 3/5] unbound-dhcp-leases-bridge: Read configuration only once Date: Wed, 30 Mar 2022 09:56:33 +0000 Message-ID: <20220330095635.621181-3-michael.tremer@ipfire.org> In-Reply-To: <20220330095635.621181-1-michael.tremer@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0989948717270559095==" List-Id: --===============0989948717270559095== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This saves some resources when we re-read the same configuration file too often. Suggested-by: Anthony Heading Signed-off-by: Michael Tremer --- config/unbound/unbound-dhcp-leases-bridge | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/unbound/unbound-dhcp-leases-bridge b/config/unbound/unbou= nd-dhcp-leases-bridge index c0e5977bf..b098d98b4 100644 --- a/config/unbound/unbound-dhcp-leases-bridge +++ b/config/unbound/unbound-dhcp-leases-bridge @@ -22,6 +22,7 @@ import argparse import datetime import daemon +import functools import ipaddress import logging import logging.handlers @@ -444,6 +445,7 @@ class Lease(object): return "localdomain" =20 @staticmethod + @functools.cache def read_settings(filename): settings =3D {} =20 --=20 2.30.2 --===============0989948717270559095==--