perf(menu):Replace Guava Cache with Caffeine in DefaultMenuService (#722)

This commit is contained in:
PengyuDeng 2025-11-18 15:09:06 +08:00 committed by GitHub
parent b952f34719
commit 7c46400585
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@
*/
package org.jetlinks.community.auth.service;
import com.google.common.cache.CacheBuilder;
import com.github.benmanes.caffeine.cache.Caffeine;
import lombok.Generated;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
@ -164,7 +164,7 @@ public class DefaultMenuService
}
final Map<List<String>, Flux<MenuView>> grantedCaching =
CacheBuilder
Caffeine
.newBuilder()
.expireAfterAccess(Duration.ofSeconds(10))
.<List<String>, Flux<MenuView>>build()