• Cache all results from this function in a local cache with a specified TTL in seconds

    Type Parameters

    • T extends ((...args) => any)

    Parameters

    • targetFn: T
    • Optional ttlOrOptions: number | CacheOptions

      Time a cached entry is valid in seconds; any value of 0 or lower indicates the cache never not expires

    Returns T