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
Thought about this some more. Might make sense to expose an API for setting cache entries. Every time we need to invalidate a cache entry, it is because we have a new value for it. Maybe just set that new value into the cache.
This mimics the functionality of hookRequire without necessitating a hook.
On the other hand, hookRequire saves fs calls by storing every loaded module into the cache.
If a consumer uses emptyCacheBetweenOperations then they should still take care to implement retrieveSourceMap. Even then, new SourceMapConsumer() is called every time, and I'm not sure of the performance implications.
This is why I'm averse to emptyCacheBetweenOperations.
Today the only option is to wipe the cache fully for each operation. Instead, we can expose an API to invalidate individual items in the cache.
The text was updated successfully, but these errors were encountered: