LocalCacheConfig

class LocalCacheConfig

Config class for local cache.

Since

4.5.0

Constructors

Link copied to clipboard
fun LocalCacheConfig()

Functions

Link copied to clipboard
fun copy(sqlcipherConfig: SqlcipherConfig? = this.sqlCipherConfig, maxSize: Long = this.maxSize, clearOrder: CachedDataClearOrder = this.clearOrder, customClearOrderComparator: Comparator<CachedBaseChannelInfo>? = this.customClearOrderComparator, enableAutoResend: Boolean = this.enableAutoResend): LocalCacheConfig
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard
var clearOrder: CachedDataClearOrder

DB clear order when the DB size exceeds the maxSize. If this is set to CachedDataClearOrder.CUSTOM and customClearOrderComparator is not set, the order will be reset to the default order (CachedDataClearOrder.MESSAGE_COLLECTION_ACCESSED_AT).

Link copied to clipboard
var customClearOrderComparator: Comparator<CachedBaseChannelInfo>? = null

Comparator to be used for sorting cached channels when deleting channel messages from DB. This will be used only when the clearOrder is set to CachedDataClearOrder.CUSTOM and the current db size exceeds the maxSize.

Link copied to clipboard
var enableAutoResend: Boolean = true

Flag whether to enable message auto resend feature for messages sent in offline state.

Link copied to clipboard
var maxSize: Long

Max DB size to keep in MB. If db size becomes greater than this value, SDK will clear DB to manage appropriate DB size on SendbirdChat.init. Minimum size is 64MB and if set less than 64, SDK will use the minimum size. Defaults to 256MB.

Link copied to clipboard
var sqlCipherConfig: SqlcipherConfig? = null

Config class for using sqlcipher. To use encryption, you should provide a SqlcipherConfig instance.