Enumerations
The following enumerations are available globally.
-
Defines the action to take when a DataProvider is stopped during task interruption.
This enum controls the lifecycle management of DataProvider instances when they are interrupted by higher-priority tasks in LIFO(.stop) strategy. The choice between reuse and dealloc affects memory usage, performance, and task resumption behavior.
Performance Implications
- Reuse: Lower memory allocation overhead, faster task resumption, higher memory usage
- Dealloc: Higher allocation overhead, slower resumption, lower memory footprint
Use Case Guidelines
- Choose reuse for tasks that are likely to resume soon or have expensive setup
- Choose dealloc for tasks with large memory footprint or unlikely to resume
Declaration
Swift
public enum KVHeavyTaskDataProviderStopAction
-
Discrete outcomes recorded by the cache for statistics.
See moreDeclaration
Swift
public enum CacheRecord
-
RetryCount: Configurable retry policy with backoff strategies.
Encapsulates common retry patterns for asynchronous operations, including:
- No retries (
never
) - Fixed number of retries with optional delay strategy (
count
) - Infinite retries with optional delay strategy (
infinity
)
Delay strategies are modeled via
See moreIntervalProxy
, covering fixed delays, pure exponential backoff, and hybrid schemes that switch between exponential and fixed delays.Declaration
Swift
public enum RetryCount
extension RetryCount: ExpressibleByIntegerLiteral
- No retries (