fix 修复 CacheName 缓存key存储错误问题

feature/model
疯狂的狮子Li 1 year ago
parent a7586639ab
commit c616a55647

@ -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());
}

Loading…
Cancel
Save