Skip to content

Commit 55d83a7

Browse files
authored
fix: separate plugin chain cache based on whether a plugin needs to be skipped or not (#916)
1 parent 5164648 commit 55d83a7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

aws_advanced_python_wrapper/plugin_service.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -901,10 +901,11 @@ def _execute_with_subscribed_plugins(
901901
plugin_func: Callable,
902902
target_driver_func: Callable,
903903
plugin_to_skip: Optional[Plugin] = None):
904-
pipeline_func: Optional[Callable] = self._function_cache.get(method_name)
904+
cache_key = method_name if plugin_to_skip is None else method_name + plugin_to_skip.__class__.__name__
905+
pipeline_func: Optional[Callable] = self._function_cache.get(cache_key)
905906
if pipeline_func is None:
906907
pipeline_func = self._make_pipeline(method_name, plugin_to_skip)
907-
self._function_cache[method_name] = pipeline_func
908+
self._function_cache[cache_key] = pipeline_func
908909

909910
return pipeline_func(plugin_func, target_driver_func)
910911

0 commit comments

Comments
 (0)