faastjs.limits.cache.md

May 15, 2023 ยท View on GitHub

faastjs > Limits > cache

Limits.cache property

Similar to memoize except the map from function arguments to results is stored in a persistent cache on disk. This is useful to prevent redundant calls to APIs which are expected to return the same results for the same arguments, and which are likely to be called across many faast.js module instantiations. This is used internally by faast.js for caching cloud prices for AWS, and for saving the last garbage collection date for AWS. Persistent cache entries expire after a period of time. See PersistentCache.

Signature:

cache?: PersistentCache;