MemoryLru

data class MemoryLru(val groupMaxSize: Int = MemoryLruMiraiRecallMessageCacheStrategy.DEFAULT_GROUP_MAX_SIZE, val friendMaxSize: Int = MemoryLruMiraiRecallMessageCacheStrategy.DEFAULT_FRIEND_MAX_SIZE, val loadFactor: Float = MemoryLruMiraiRecallMessageCacheStrategy.DEFAULT_LOAD_FACTOR) : RecallMessageCacheStrategyConfiguration(source)

代表为使用 MemoryLruMiraiRecallMessageCacheStrategy , 即使用基于内存的LRU缓存策略。

{
"type": "memory_lru",
"groupMaxSize": 1536,
"friendMaxSize": 96
}

Constructors

Link copied to clipboard
fun MemoryLru(groupMaxSize: Int = MemoryLruMiraiRecallMessageCacheStrategy.DEFAULT_GROUP_MAX_SIZE, friendMaxSize: Int = MemoryLruMiraiRecallMessageCacheStrategy.DEFAULT_FRIEND_MAX_SIZE, loadFactor: Float = MemoryLruMiraiRecallMessageCacheStrategy.DEFAULT_LOAD_FACTOR)

Types

Link copied to clipboard
object Companion

Functions

Properties

Link copied to clipboard

缓存好友消息的最大上限, 会根据 loadFactor 计算为最终的初始化容量

Link copied to clipboard

缓存消息的最大上限, 会根据 loadFactor 计算为最终的初始化容量

Link copied to clipboard

内部哈希表所使用的负载因子