From c1439d38c46e06b5378c3a453592c2d7be907bbd Mon Sep 17 00:00:00 2001 From: Morgan Epp <60796713+epmog@users.noreply.github.com> Date: Tue, 4 Nov 2025 16:26:04 -0600 Subject: [PATCH] fix: path mapping lru cache grows indefinitely Signed-off-by: Morgan Epp <60796713+epmog@users.noreply.github.com> --- src/openjd/adaptor_runtime_client/base_client_interface.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openjd/adaptor_runtime_client/base_client_interface.py b/src/openjd/adaptor_runtime_client/base_client_interface.py index a3c68ca3..89329177 100644 --- a/src/openjd/adaptor_runtime_client/base_client_interface.py +++ b/src/openjd/adaptor_runtime_client/base_client_interface.py @@ -122,7 +122,7 @@ def _request_next_action(self) -> _Tuple[int, str, _Action | None]: action = _Action(response_body["name"], response_body["args"]) return response.status, response.reason, action - @_lru_cache(maxsize=None) + @_lru_cache(maxsize=100000) def map_path(self, path: str) -> str: """Sending a get request to the server on the /path_mapping endpoint. This will be used to get the Adaptor to map a given path. @@ -149,7 +149,7 @@ def map_path(self, path: str) -> str: f"Server response: Status: {int(response.status)}, Response: '{reason}'", ) - @_lru_cache(maxsize=None) + @_lru_cache(maxsize=100000) def path_mapping_rules(self) -> _List[PathMappingRule]: """Sending a get request to the server on the /path_mapping_rules endpoint. This will be used to get the Adaptor to map a given path.