citty
citty copied to clipboard
feat: cache async results
close #34
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.
Thanks for PR again, considering the risks of stalling resolved value, i think it is better we don't introduce it.