Kingfisher Documentation

Structure Delay​Retry​Strategy

public struct DelayRetryStrategy: RetryStrategy  

A retry strategy that guides Kingfisher to retry when a .responseError happens, with a specified max retry count and a certain interval mechanism.

%15 DelayRetryStrategy DelayRetryStrategy RetryStrategy RetryStrategy DelayRetryStrategy->RetryStrategy

Nested Types

DelayRetryStrategy.Interval

Represents the interval mechanism which used in a DelayRetryStrategy.

Conforms To

RetryStrategy

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

Initializers

init(max​Retry​Count:​retry​Interval:​)

public init(maxRetryCount: Int, retryInterval: Interval = .seconds(3))  

Creates a delay retry strategy.

Parameters

max​Retry​Count Int

The max retry count.

retry​Interval Interval

The retry interval mechanism. By default, .seconds(3) is used to provide a constant retry interval.

Properties

max​Retry​Count

public let maxRetryCount: Int

The max retry count defined for the retry strategy

retry​Interval

public let retryInterval: Interval

The retry interval mechanism defined for the retry strategy.

Methods

retry(context:​retry​Handler:​)

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