mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +00:00
human.format_address: add lru cache
This commit is contained in:
parent
af3dfac855
commit
cfc180e211
@ -75,6 +75,7 @@ def format_timestamp_with_milli(s):
|
||||
return d.strftime("%Y-%m-%d %H:%M:%S.%f")[:-3]
|
||||
|
||||
|
||||
@functools.lru_cache()
|
||||
def format_address(address: typing.Optional[tuple]) -> str:
|
||||
"""
|
||||
This function accepts IPv4/IPv6 tuples and
|
||||
|
Loading…
Reference in New Issue
Block a user