Breaking
- Remove
maxAge
option 19b418e- For a custom
cache
, this means instead of.set()
being provided an object with the propertiesvalue
andmaxAge
, it will only be providedvalue
as 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 customcache
will be provided the values of resolved promises instead of the promises themselves.