|
|
@ -118,6 +118,10 @@ public class PlusSpringCacheManager implements CacheManager {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public Cache getCache(String name) {
|
|
|
|
public Cache getCache(String name) {
|
|
|
|
|
|
|
|
// 重写 cacheName 支持多参数
|
|
|
|
|
|
|
|
String[] array = StringUtils.delimitedListToStringArray(name, "#");
|
|
|
|
|
|
|
|
name = array[0];
|
|
|
|
|
|
|
|
|
|
|
|
Cache cache = instanceMap.get(name);
|
|
|
|
Cache cache = instanceMap.get(name);
|
|
|
|
if (cache != null) {
|
|
|
|
if (cache != null) {
|
|
|
|
return cache;
|
|
|
|
return cache;
|
|
|
@ -132,9 +136,6 @@ public class PlusSpringCacheManager implements CacheManager {
|
|
|
|
configMap.put(name, config);
|
|
|
|
configMap.put(name, config);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 重写 cacheName 支持多参数
|
|
|
|
|
|
|
|
String[] array = StringUtils.delimitedListToStringArray(name, "#");
|
|
|
|
|
|
|
|
name = array[0];
|
|
|
|
|
|
|
|
if (array.length > 1) {
|
|
|
|
if (array.length > 1) {
|
|
|
|
config.setTTL(DurationStyle.detectAndParse(array[1]).toMillis());
|
|
|
|
config.setTTL(DurationStyle.detectAndParse(array[1]).toMillis());
|
|
|
|
}
|
|
|
|
}
|
|
|
|