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
So I found I can clear cache by setting func.cache.data to empty object, but not sure if this is appropriate. What is general recommendation on this? Should new .cache property be created, or it is appropriate just clear .cache.data?
The text was updated successfully, but these errors were encountered:
Looking through WeakMap documentation on mozilla website I found that WeakMap implements .clear() method. If I make a PR with similar modification to the API, will it be considered?
Clearing isn't enforced because devs can use a WeakMap which doesn't have clear and I wanted to keep our default interface small. If you'd like to clear caches I'd recommend using a Map (and its shim if needed) for the cache backing _.memoize.Cache = Map.
So I found I can clear cache by setting func.cache.data to empty object, but not sure if this is appropriate. What is general recommendation on this? Should new .cache property be created, or it is appropriate just clear .cache.data?
The text was updated successfully, but these errors were encountered: