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) {