tweak chat cache

pull/9913/head
Thibault Duplessis 2021-10-02 12:28:31 +02:00
parent 99ab44b585
commit 486fc19047
1 changed files with 2 additions and 3 deletions

View File

@ -33,9 +33,8 @@ final class ChatApi(
// only use for public, multi-user chats - tournaments, simuls // only use for public, multi-user chats - tournaments, simuls
object cached { object cached {
private val cache = cacheApi[Chat.Id, UserChat](128, "chat.user") { private val cache = cacheApi[Chat.Id, UserChat](1024, "chat.user") {
_.expireAfterAccess(1 minute) _.expireAfterWrite(1 minute).buildAsyncFuture(find)
.buildAsyncFuture(find)
} }
def invalidate = cache.invalidate _ def invalidate = cache.invalidate _