Function cachedRemoteDataWithExpiration

  • Retrieves data from storage layer if it exists and is not expired, otherwise fetches data from a remote URL and caches it in storage layer.

    Type Parameters

    • T

    Parameters

    • args: cachedRemoteDataArgs

      An object containing the arguments for the function.

    Returns Promise<T>

    Returns a Promise that resolves with the cached data if it exists and is not expired, otherwise it resolves with the data fetched from the remote URL.

    Async

    Function

    cachedRemoteData