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
}
Content copied to clipboard
Constructors
Types
Functions
Link copied to clipboard
open override fun recallMessageCacheStrategy(config: MiraiBotVerifyInfoConfiguration): MiraiRecallMessageCacheStrategy
提供 MiraiBotVerifyInfoConfiguration 信息,计算并得到一个缓存策略 MiraiRecallMessageCacheStrategy。