@arcmantle/library
    Preparing search index...

    Function cachedPromise

    • Wraps a function that generates a Promise.
      Will return the same promise to all callers until promise has been resolved
      and flush argument was set to true.

      Type Parameters

      • T extends (...args: any) => Promise<any>

      Parameters

      • func: T
      • flush: boolean = true

        Clear the cache after response has completed?

        true
        

      Returns (...args: Parameters<T>) => Promise<Awaited<ReturnType<T>>>