diff --git a/ruoyi-common/ruoyi-common-redis/src/main/java/org/dromara/common/redis/manager/PlusSpringCacheManager.java b/ruoyi-common/ruoyi-common-redis/src/main/java/org/dromara/common/redis/manager/PlusSpringCacheManager.java index 2a1391d0..08ebc782 100644 --- a/ruoyi-common/ruoyi-common-redis/src/main/java/org/dromara/common/redis/manager/PlusSpringCacheManager.java +++ b/ruoyi-common/ruoyi-common-redis/src/main/java/org/dromara/common/redis/manager/PlusSpringCacheManager.java @@ -118,6 +118,10 @@ public class PlusSpringCacheManager implements CacheManager { @Override public Cache getCache(String name) { + // 重写 cacheName 支持多参数 + String[] array = StringUtils.delimitedListToStringArray(name, "#"); + name = array[0]; + Cache cache = instanceMap.get(name); if (cache != null) { return cache; @@ -132,9 +136,6 @@ public class PlusSpringCacheManager implements CacheManager { configMap.put(name, config); } - // 重写 cacheName 支持多参数 - String[] array = StringUtils.delimitedListToStringArray(name, "#"); - name = array[0]; if (array.length > 1) { config.setTTL(DurationStyle.detectAndParse(array[1]).toMillis()); }