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 get_or_store function can not be properly used due to the fact that it returns different values whether it gets or stores.
If I'm missing the intended use case, please provide an example. Otherwise the correct implementation should be to always return the value, either after get, either after storing (instead of :ok).
The text was updated successfully, but these errors were encountered:
I just looked into the code, and as far as I can tell, get_or_store should always return the value. This is confirmed by typespec of the function and the tests. Can you show a code snippet where this doesn't happen?
Can't replicate it anymore so probably my code was doing something funky. Thanks for your support - I'll close this and reopen if I'll be able to reproduce it down the road. Cheers!
The get_or_store function can not be properly used due to the fact that it returns different values whether it gets or stores.
If I'm missing the intended use case, please provide an example. Otherwise the correct implementation should be to always return the value, either after get, either after storing (instead of :ok).
The text was updated successfully, but these errors were encountered: