@grandlinex/kernel
    Preparing search index...

    Class CoreCachedFc<T>

    A cache wrapper around an asynchronous function that stores the result for a specified timeout period. Subsequent calls within the timeout return the cached value instead of invoking the function again.

    Type Parameters

    • T

      The type of the value returned by the wrapped function.

    Index
    • Type Parameters

      • T

        The type of the value returned by the wrapped function.

      Parameters

      • timeout: number
      • fc: () => Promise<T>

      Returns CoreCachedFc<T>

    data: T | null
    fc: () => Promise<T>
    timeOut: number
    • Returns Promise<T>