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
I tried to use this memoizer for fuction with 5 arguments, and I implemented the custom cache with .get() .set() and .has() methods
We have 100% test coverage rule for our code. And after running tests I see that .has() method is never called. I checked the source code for fast-memoize and I see no usage of .has() method at all.
So, either documentation should be updated to not mention the .has() method as it is not required, or the code was overoptimized and instead of calling .has() and then .get() you assume that if .get() returns undefined, it means that it wasn't stored. If that's the case, please add this to documentation to manage expectations of library users better.
The text was updated successfully, but these errors were encountered:
I remember we at some point removed has call for speed purposes.
If we used has, we would need to call has and get in order to get a value from cache.
Nowadays we use only get, removing the need to call has. One call only to check and get values from cache.
We might change this in the future, so I don't want to change the docs.
I tried to use this memoizer for fuction with 5 arguments, and I implemented the custom cache with .get() .set() and .has() methods
We have 100% test coverage rule for our code. And after running tests I see that .has() method is never called. I checked the source code for fast-memoize and I see no usage of .has() method at all.
So, either documentation should be updated to not mention the .has() method as it is not required, or the code was overoptimized and instead of calling .has() and then .get() you assume that if .get() returns undefined, it means that it wasn't stored. If that's the case, please add this to documentation to manage expectations of library users better.
The text was updated successfully, but these errors were encountered: