Skip to content

Commit 7c46400

Browse files
authored
perf(menu):Replace Guava Cache with Caffeine in DefaultMenuService (#722)
1 parent b952f34 commit 7c46400

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jetlinks-manager/authentication-manager/src/main/java/org/jetlinks/community/auth/service/DefaultMenuService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
package org.jetlinks.community.auth.service;
1717

18-
import com.google.common.cache.CacheBuilder;
18+
import com.github.benmanes.caffeine.cache.Caffeine;
1919
import lombok.Generated;
2020
import lombok.extern.slf4j.Slf4j;
2121
import org.apache.commons.collections4.CollectionUtils;
@@ -164,7 +164,7 @@ public Flux<MenuView> getGrantedMenus(QueryParamEntity queryParam, List<Dimensio
164164
}
165165

166166
final Map<List<String>, Flux<MenuView>> grantedCaching =
167-
CacheBuilder
167+
Caffeine
168168
.newBuilder()
169169
.expireAfterAccess(Duration.ofSeconds(10))
170170
.<List<String>, Flux<MenuView>>build()

0 commit comments

Comments
 (0)