LocalCacheConfig

@objc(SBDLocalCacheConfig)
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.0

    Declaration

    Swift

    @objc
    public var maxSize: Int64 { get set }
  • The order for deleting messages.

    Since

    4.6.0

    Declaration

    Swift

    @objc
    public var clearOrder: CachedDataClearOrder
  • A comparator that has to be implemented to determine that which channel’s message will be deleted.

    Since

    4.6.0

    Declaration

    Swift

    @objc
    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 at CompleteUntilFirstUserAuthentication level.

    Since

    4.6.0

    Declaration

    Swift

    @objc
    public internal(set) var isEncryptionEnabled: Bool { get }
  • 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.0

    Declaration

    Swift

    @objc
    public internal(set) var enableAutoResend: Bool { get }
  • Undocumented

    Declaration

    Swift

    @objc
    convenience public init(isEncryptionEnabled: Bool)
  • Undocumented

    Declaration

    Swift

    @objc
    public init(isEncryptionEnabled: Bool = false, enableAutoResend: Bool = true)