-
-
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
Feature request: Return stale value while revalidating #19
Comments
I think this could be an option, but not on by default. |
Yeah, sounds useful as an opt-in option. |
Hello @sindresorhus, I am interested in helping out with this feature. How can I help with it? |
@AmrSaber PRs are always welcome |
I don't understand how #26 closes this ticket? How do we achieve the stale-while-revalidate scenario now? |
#26 Moves this feature into userland. |
Can you show an example of how to achieve this? |
False alarm: after the previous PR, I'm not sure how to check if a value is stale anymore to then call the function again. |
Should this be reopened then? |
Yes, but with the new goal of adding an API to the cache storage object to check whether the object is stale and whether stale-while-revalidate should be used |
When used with
maxAge
option, when the cache entry has expired, memoized function could return last cached value while waiting for a new result to arrive.The text was updated successfully, but these errors were encountered: