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
Hi, here is a follow up to #70. I am not very experienced in Python, so I hope this doesn't waste anyone's time 🤞.
I believe functions are hashable and the cache should be invalidated when a hashable input changes. Do you agree? Does not seem to be the case, even though the hash changes:
fromcachierimportcachierdefmy_fun24(x):
returnxprint(hash(my_fun24))
#>>> 8786991674287@cachier()defx(f):
returnmy_fun24(1)
print(x(my_fun24))
#>>> 1# let's change the function...defmy_fun24(x):
return2*x# ... and verify the hash changesprint(hash(my_fun24))
#>>> 8786992186206# but `x()` is using the cached value apparentlyprint(x(my_fun24))
#>>> 1
The text was updated successfully, but these errors were encountered:
This is an often-requested feature which is way more complex than it seems initially.
This was discussed in the following issues: #9 #34
And attempted in two separate pull requests: #17 , which was merged and then had to be reverted due to issues #18 and #19 #35 , which was rejected for the same reasons.
I would absolutely LOVE it if you would like to make a contribution to help with this feature. If you would like to do so, however, you would have to start with getting up-to-date with past discussions, issues and attempted contributions. Read up and let me know what you think.
Finally, I'm closing this issue as it's a duplicate of #34 .
Please continue all related discussion there.
Hi, here is a follow up to #70. I am not very experienced in Python, so I hope this doesn't waste anyone's time 🤞.
I believe functions are hashable and the cache should be invalidated when a hashable input changes. Do you agree? Does not seem to be the case, even though the hash changes:
The text was updated successfully, but these errors were encountered: