[v2,3/5] unbound-dhcp-leases-bridge: Read configuration only once
Commit Message
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>
---
config/unbound/unbound-dhcp-leases-bridge | 2 ++
1 file changed, 2 insertions(+)
@@ -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 = {}