RetryStrategy

public protocol RetryStrategy

Defines a retry strategy can be applied to a .retryStrategy option.

  • Kingfisher calls this method if an error happens during the image retrieving process from a KingfisherManager. You implement this method to provide necessary logic based on the context parameter. Then you need to call retryHandler to pass the retry decision back to Kingfisher.

    Declaration

    Swift

    func retry(context: RetryContext, retryHandler: @escaping (RetryDecision) -> Void)

    Parameters

    context

    The retry context containing information of current retry attempt.

    retryHandler

    A block you need to call with a decision of whether the retry should happen or not.