Skip to content

Commit 8937f21

Browse files
authored
fix: path mapping lru cache grows indefinitely (#239)
Signed-off-by: Morgan Epp <[email protected]>
1 parent 3345494 commit 8937f21

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/openjd/adaptor_runtime_client/base_client_interface.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def _request_next_action(self) -> _Tuple[int, str, _Action | None]:
122122
action = _Action(response_body["name"], response_body["args"])
123123
return response.status, response.reason, action
124124

125-
@_lru_cache(maxsize=None)
125+
@_lru_cache(maxsize=100000)
126126
def map_path(self, path: str) -> str:
127127
"""Sending a get request to the server on the /path_mapping endpoint.
128128
This will be used to get the Adaptor to map a given path.
@@ -149,7 +149,7 @@ def map_path(self, path: str) -> str:
149149
f"Server response: Status: {int(response.status)}, Response: '{reason}'",
150150
)
151151

152-
@_lru_cache(maxsize=None)
152+
@_lru_cache(maxsize=100000)
153153
def path_mapping_rules(self) -> _List[PathMappingRule]:
154154
"""Sending a get request to the server on the /path_mapping_rules endpoint.
155155
This will be used to get the Adaptor to map a given path.

0 commit comments

Comments
 (0)