memoized
Last updated
Last updated
• Docs
/ / memoized
memoized<
T
>(cache
,key
,fn
, ...args
):Promise
<T
>
memoize an async function call so that while it is pending, the same call is not made again
This is used by the ResolveCallers.requestCache to avoid making multiple requests for the same twine.
T
cache
Map
<string
, Promise
<T
>>
The cache to use
key
string
The key to use
fn
The function to call
...args
any
[]
The arguments to pass to the function
Promise
<T
>
(...args
) => <T
>