You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The proposed patch seems to have a flaw to me. The cache key is generated from the passed **kwargs and *args, this means that for a function defined as:
def a_function(x, y=None):
return 'whatever'
calling it as a_function(1, 2) will lead to a different cache key than a_function(x=1, y=2) this is due to the fact that joined_kwargs is constructed depending on the actually passed function arguments, so it depends on the way the arguments are passed.
You should probably pass through inspect.getcallargs before generating the cache key so that it is unrealted to the way the function is called.
I'm using the decorator 'cache_region' and it's not possible to cache a function which has kwargs :
When invoking the function 'a_function', we get an exception like:
This behavior happens with any decorator for caching functions
The text was updated successfully, but these errors were encountered: