cacheables
cacheables copied to clipboard
A simple in-memory cache written in Typescript with automatic cache invalidation and an elegant syntax.
the source code  when the resource() error, my code `return Promise.reject()` source code: #fetch -> `await this.#promise` no try...catch. Causes cache judgment error
Relevant to #6 . When the `resource` function returns a rejected promise, the `#fetch` function throws immediately without clearing the `#promise` field. So in every calls of `#fetchNonConcurrent` later, it...
This PR allows a custom cache connector to replace the in-memory cache. This PR retains the default behavior of the library (in-memory cache) but allows you to specify a connector...