Skip to content
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

feat: cache async results #36

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zuixinwang
Copy link
Contributor

close #34

@pi0
Copy link
Member

pi0 commented Jun 18, 2023

Hi. Thanks for this PR (and sorry for late review). I think this would be a really really nice enhancement. However we might need to make it opt-in (or opt-out) by explicitly passing a context dependent (non global) cavche instance from resolveValue calls.

Having live value would be particularly useful for supporting HMR with cli development.

Also note that usual usage for async with dynamic imports, Node.js ALWAYS caches the import results so calling it twice would already leverage cache.

@pi0 pi0 added the dicussion label Jun 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cache async results
2 participants