This might be relevant to this exact pattern
const getThing = (async function (arg1, arg2) { console.log({ arg1, arg2 }); return arg1 + (arg2 || 0); }).memo(); console.log(await getThing(1)); // New promise console.log(await getThing(2)); // New promise console.log(await getThing(1)); // Returns promise from earlier
This might be relevant to this exact pattern