RefreshParameters

public struct RefreshParameters

Parameters for configuring a resource refresher.

  • Creates parameters to be used with a ResourceRefresher.

    Declaration

    Swift

    public init(id: String, url: URL, refreshInterval: TimeFrame, errorCooldownBaseInterval: TimeFrame? = nil)

    Parameters

    id

    A unique String, used to identify the specific Refresher and the specific Resource it’s refreshing.

    url

    The URL used to send the GET requests

    refreshInterval

    the interval used to refresh the resource after the initial refresh

    errorCooldownBaseInterval

    if present, it’s the interval that is used, instead of the refreshInterval, in case of no resource found in the cache. It must be lower then refreshInterval if provided.