-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An option to wait for cache.set
to resolve before resolving the returned promise (or even make this the default behavior)
#34
Comments
futpib
added a commit
to futpib/p-memoize
that referenced
this issue
Nov 7, 2021
futpib
added a commit
to futpib/p-memoize
that referenced
this issue
Nov 7, 2021
futpib
added a commit
to futpib/p-memoize
that referenced
this issue
Nov 7, 2021
Maybe it should be made an option? |
Even if we did await all await Promise.all([
memoized('foo'),
memoized('foo'),
]); |
^ @futpib Any opinion? It's unclear to me what the best way forward here is. |
@sindresorhus Solved it by caching the entire asynchronous part of the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
One can bypass cache by making multiple consecutive calls with the same arguments:
p-memoize/index.ts
Line 122 in e8574a1
See this PR for a test that demonstrates this #35
See this PR for a head-on fix (breaking change) that awaits all cache operations #36
The text was updated successfully, but these errors were encountered: