Caching
public struct Caching
A caching configuration.
-
Limits the amount of memory usage in RAM.
Declaration
Swift
public let costLimit: Int -
Limits the number of objects in RAM.
Declaration
Swift
public let countLimit: Int -
Indicates whether caching is enabled or not.
Declaration
Swift
public let isEnabled: Bool -
Initializes a new instance of
CachingConfigurationwith thecostLimit,countLimit, andisEnabledparameters.Declaration
Swift
public init(costLimit: Int = 0, countLimit: Int = 0, isEnabled: Bool = true)Parameters
costLimitLimits the amount of memory usage in RAM. Defaults to
0which means unlimited. But, an OS can evict objects anytime due to memory pressure.countLimitLimits the number of objects in RAM. Defaults to
0which means unlimited. But, an OS can evict objects anytime due to memory pressure.isEnabledIndicates whether caching is enabled or not. Defaults to
true.
View on GitHub
Install in Dash
Caching Structure Reference