Releases: sindresorhus/p-memoize
Releases Β· sindresorhus/p-memoize
v8.0.0
Breaking
- Require Node.js 20 bcae1dc
- Support modern decorators 031d770
- Support for legacy decorators have been removed
Improvements
- Add
shouldCacheoption (#60) 55cc5d3
v7.1.1
- Add missing dependency when used with TypeScript 00faae0
v7.1.0
v7.0.0
v6.0.2
v4.0.4
- Follow-up fix to backport in 4.0.3.
v4.0.3
- Backport 343ac6e from v5.
v6.0.1
v6.0.0
Breaking
- Remove
maxAgeoption 19b418e- For a custom
cache, this means instead of.set()being provided an object with the propertiesvalueandmaxAge, it will only be providedvalueas the first argument. - How to preserve max age functionality.
- For a custom
Improvements
- The custom cache can now be async by returning a promise in the
.get()and.has()cache methods - Promises returned from a memoized function will be cached internally and take priority over
cache. The promise cache does not persist outside of the current instance and properties assigned to a returned promise will not be kept. The customcachewill be provided the values of resolved promises instead of the promises themselves.