LocalCacheConfig
public final class LocalCacheConfig: NSObject
An object that specifies the options for the local caching.
Since
4.6.0-
The max size of the database in megabyte. The minimum value is 64MB.
Since
4.6.0Declaration
Swift
public var maxSize: Int64 = 256
-
The order for deleting messages.
Since
4.6.0Declaration
Swift
public var clearOrder: CachedDataClearOrder = .messageCollectionAccessedAt
-
A comparator that has to be implemented to determine that which channel’s message will be deleted.
Since
4.6.0Declaration
Swift
public var customClearOrderComparator: ((CachedBaseChannelInfo, CachedBaseChannelInfo) -> ComparisonResult)?
Return Value
ComparisonResult
-
Determines whether encryption is turned on when using Local Caching. If set to true, files are protected at
CompleteUnlessOpen
level. Default is false, which protects files atCompleteUntilFirstUserAuthentication
level.Since
4.6.0Declaration
Swift
public internal(set) var isEncryptionEnabled: Bool
-
Option to enable auto resending of messages that have failed due to network reasons. If set to true, when the network connection is reconnected, the SDK will internally try to resend messages.
Since
4.11.0Declaration
Swift
public internal(set) var enableAutoResend: Bool
-
Undocumented
Declaration
Swift
convenience public init(isEncryptionEnabled: Bool)
-
Undocumented
Declaration
Swift
public init(isEncryptionEnabled: Bool = false, enableAutoResend: Bool = true)