...
|
...
|
@@ -246,17 +246,18 @@ public class RedisGwCacheClient implements CacheClient { |
|
|
result.put(redisKeyBuilders.get(i).getKey(), JSON.parseObject(curItem, clazz));
|
|
|
}
|
|
|
}
|
|
|
Map<K, T> lastResult = new HashMap<>();
|
|
|
|
|
|
Map<K, T> apply = nullCacheFun.apply(nullCachekeys); // 执行回调函数去数据库查询未缓存的键值集合
|
|
|
|
|
|
for(Map.Entry<K, T> item : apply.entrySet()) {
|
|
|
result.put(String.valueOf(item.getKey()), item.getValue());
|
|
|
lastResult.put(item.getKey(), item.getValue());
|
|
|
}
|
|
|
|
|
|
setBulk(apply, timeOut, cacheKeyPre, clazz); // 将不在缓存的键值对批量放入缓存
|
|
|
|
|
|
Map<K, T> lastResult = new HashMap<>();
|
|
|
for(Map.Entry<String, T> entry : result.entrySet()) {
|
|
|
lastResult.put(keyConvertFun.apply(entry.getKey()), entry.getValue());
|
|
|
lastResult.put(cacheKeyAndStringMap.get(entry.getKey()), entry.getValue());
|
|
|
}
|
|
|
|
|
|
return lastResult;
|
...
|
...
|
|