human.format_address: add lru cache

This commit is contained in:
Maximilian Hils 2020-11-21 19:49:10 +01:00
parent af3dfac855
commit cfc180e211

View File

@ -75,6 +75,7 @@ def format_timestamp_with_milli(s):
return d.strftime("%Y-%m-%d %H:%M:%S.%f")[:-3] return d.strftime("%Y-%m-%d %H:%M:%S.%f")[:-3]
@functools.lru_cache()
def format_address(address: typing.Optional[tuple]) -> str: def format_address(address: typing.Optional[tuple]) -> str:
""" """
This function accepts IPv4/IPv6 tuples and This function accepts IPv4/IPv6 tuples and