From cbe4d87b432c49b63534a790d4dc638d7db907ab Mon Sep 17 00:00:00 2001 From: konstin Date: Sat, 5 Oct 2019 14:47:02 +0200 Subject: [PATCH] Add caching to _user_overrides --- dataclasses_json/core.py | 1 + 1 file changed, 1 insertion(+) diff --git a/dataclasses_json/core.py b/dataclasses_json/core.py index 35318d1b..a199abe2 100644 --- a/dataclasses_json/core.py +++ b/dataclasses_json/core.py @@ -45,6 +45,7 @@ def default(self, o) -> Json: return result +@lru_cache(maxsize=128) def _user_overrides(cls): confs = ['encoder', 'decoder', 'mm_field', 'letter_case'] FieldOverride = namedtuple('FieldOverride', confs)