From: Michael Tremer Date: Wed, 30 Mar 2022 09:56:33 +0000 (+0000) Subject: unbound-dhcp-leases-bridge: Read configuration only once X-Git-Tag: v2.27-core167~6^2~34 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=091cb62ada59e4eae22d371c224e3b5cfaf60a0d;p=ipfire-2.x.git unbound-dhcp-leases-bridge: Read configuration only once This saves some resources when we re-read the same configuration file too often. Suggested-by: Anthony Heading Signed-off-by: Michael Tremer --- diff --git a/config/unbound/unbound-dhcp-leases-bridge b/config/unbound/unbound-dhcp-leases-bridge index c0e5977bff..b098d98b42 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" @staticmethod + @functools.cache def read_settings(filename): settings = {}