From ec6732cd6b015a90f362bcdbe0f67e95c7689467 Mon Sep 17 00:00:00 2001 From: FlyInWind <2518509078@qq.com> Date: Wed, 21 Dec 2022 23:03:32 +0800 Subject: [PATCH] =?UTF-8?q?getCacheNames=20=E8=BF=94=E5=9B=9E=E6=89=80?= =?UTF-8?q?=E6=9C=89=E7=BC=93=E5=AD=98=E5=90=8D=EF=BC=8C=E5=8C=85=E6=8B=AC?= =?UTF-8?q?=E5=8A=A8=E6=80=81=E6=B7=BB=E5=8A=A0=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugin/cache/support/RedisCaffeineCacheManager.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/pig4cloud/plugin/cache/support/RedisCaffeineCacheManager.java b/src/main/java/com/pig4cloud/plugin/cache/support/RedisCaffeineCacheManager.java index 5567014..00cb251 100755 --- a/src/main/java/com/pig4cloud/plugin/cache/support/RedisCaffeineCacheManager.java +++ b/src/main/java/com/pig4cloud/plugin/cache/support/RedisCaffeineCacheManager.java @@ -11,6 +11,7 @@ import java.time.Duration; import java.util.Collection; +import java.util.HashSet; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; @@ -120,7 +121,9 @@ protected static void doIfPresent(Duration duration, Consumer consumer @Override public Collection getCacheNames() { - return this.cacheNames; + Set set = new HashSet<>(cacheMap.keySet()); + set.addAll(this.cacheNames); + return set; } public void clearLocal(String cacheName, Object key) {