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 <ajrh@ajrh.net>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2022-03-30 09:56:33 +00:00
committed by Peter Müller
parent 6d6e7949cf
commit 091cb62ada

View File

@@ -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 = {}