Open uninstall-your-browser opened 1 month ago
wow, thanks for posting this issue! I was on the fence about using this library... not anymore
Thanks for posting this, and already diving into it. @uninstall-your-browser, would you like to create a PR for this? Life is a bit busy at the moment for me, so I don't have time to work on this package in the near future.
When 2 functions have different names but the same parameter signature, they conflict with each other when using this utility
Expected that
cube(2) = 8
.TheThis seems a bit more complex than that, cachetools relies on each function/method having a unique cache/dict, so sharing the cache withkey
function in the decorator should at least consider something likemethod.__qualname__
to prevent this in most casescachetools.cached
will have this problem unless you have another wrapper like withasynccached
orcachedasyncmethod
and add the function name (or something else that identifies the function) to the key args