From ca30543132a9df280b5afa65bf490658b2524b1b Mon Sep 17 00:00:00 2001 From: lanyuanxiaoyao Date: Fri, 2 Jun 2023 17:32:48 +0800 Subject: [PATCH] =?UTF-8?q?fix(yarn-query):=20=E4=BF=AE=E5=A4=8D=20cache?= =?UTF-8?q?=20key=20=E8=AF=AD=E6=B3=95=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/yarn/service/impl/JobServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/service-yarn-query/src/main/java/com/lanyuanxiaoyao/service/yarn/service/impl/JobServiceImpl.java b/service-yarn-query/src/main/java/com/lanyuanxiaoyao/service/yarn/service/impl/JobServiceImpl.java index 1c4fb6c..67ad440 100644 --- a/service-yarn-query/src/main/java/com/lanyuanxiaoyao/service/yarn/service/impl/JobServiceImpl.java +++ b/service-yarn-query/src/main/java/com/lanyuanxiaoyao/service/yarn/service/impl/JobServiceImpl.java @@ -40,7 +40,7 @@ public class JobServiceImpl implements JobService { this.mapper = builder.build(); } - @Cacheable(value = "job-list", sync = true, key = "#cluster") + @Cacheable(value = "job-list", sync = true) @Retryable(Throwable.class) @Override public ImmutableList list(String cluster) throws JsonProcessingException { @@ -50,14 +50,14 @@ public class JobServiceImpl implements JobService { } } - @Cacheable(value = "job-list", sync = true, key = "#{methodName+cluster+name}") + @Cacheable(value = "job-list", sync = true, key = "#methodName+#cluster+#name") @Retryable(Throwable.class) @Override public ImmutableList listEquals(String cluster, String name) throws JsonProcessingException { return list(cluster).select(app -> StrUtil.equals(app.getName(), name)); } - @Cacheable(value = "job-list", sync = true, key = "#{methodName+cluster+name}") + @Cacheable(value = "job-list", sync = true, key = "#methodName+#cluster+#name") @Retryable(Throwable.class) @Override public ImmutableList listLike(String cluster, String name) throws JsonProcessingException {