@adobe/data - v0.10.30
    Preparing search index...

    Function memoize

    • Uses datacache to store results so we can avoid expensive recomputations of the same input. This function also uses preventParallelExecution to prevent multiple executions of the same function at the same time with the same arguments.

      Type Parameters

      • In extends object
      • Out

      Parameters

      • fn: (input: In) => Out

        The function to memoize by storing results in the DataCache.

      Returns (input: In) => Out

      A function with the same signature but memoized results.

    • Uses datacache to store results so we can avoid expensive recomputations of the same input. This function also uses preventParallelExecution to prevent multiple executions of the same function at the same time with the same arguments.

      Type Parameters

      Parameters

      • uniqueNameAndVersion: string

        Application-unique identifier that also encodes a version to avoid stale caches.

      • fn: AsyncDataFunction<In, Out>

        The function to memoize by storing results in the DataCache.

      Returns AsyncDataFunction<In, Out>

      A function with the same signature but memoized results.