]> git.ipfire.org Git - people/mfischer/ipfire-2.x.git/commitdiff
unbound-dhcp-leases-bridge: Read configuration only once
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 30 Mar 2022 09:56:33 +0000 (09:56 +0000)
committerPeter Müller <peter.mueller@ipfire.org>
Mon, 4 Apr 2022 20:07:15 +0000 (20:07 +0000)
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

index c0e5977bffb7fc4f939e76f9b05d6a8b993d5714..b098d98b4292c0dae032ce4dbe2c5cb7b1786d3d 100644 (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 = {}