From 6279b817d5df76e651c866c6c5ba7e12a65e12b2 Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Wed, 17 Jan 2024 18:57:22 -0800 Subject: [PATCH] Add @lru_cache to ImageBuildEngine.build (#2112) Signed-off-by: Kevin Su --- flytekit/image_spec/image_spec.py | 1 + 1 file changed, 1 insertion(+) diff --git a/flytekit/image_spec/image_spec.py b/flytekit/image_spec/image_spec.py index 5b437f0b17..cef455acbb 100644 --- a/flytekit/image_spec/image_spec.py +++ b/flytekit/image_spec/image_spec.py @@ -197,6 +197,7 @@ def register(cls, builder_type: str, image_spec_builder: ImageSpecBuilder): cls._REGISTRY[builder_type] = image_spec_builder @classmethod + @lru_cache def build(cls, image_spec: ImageSpec): img_name = image_spec.image_name() if img_name in cls._BUILT_IMAGES or image_spec.exist():