...
|
...
|
@@ -256,12 +256,13 @@ public class RedisGwCacheClient implements CacheClient { |
|
|
lastResult.put(cacheKeyAndStringMap.get(entry.getKey()), entry.getValue());
|
|
|
}
|
|
|
|
|
|
Map<K, T> apply = nullCacheFun.apply(nullCachekeys); // 执行回调函数去数据库查询未缓存的键值集合
|
|
|
setBulk(apply, timeOut, cacheKeyPre, clazz); // 将不在缓存的键值对批量放入缓存
|
|
|
for(Map.Entry<K, T> item : apply.entrySet()) {
|
|
|
lastResult.put(item.getKey(), item.getValue());
|
|
|
if (CollectionUtils.isNotEmpty(nullCachekeys)) {
|
|
|
Map<K, T> apply = nullCacheFun.apply(nullCachekeys); // 执行回调函数去数据库查询未缓存的键值集合
|
|
|
setBulk(apply, timeOut, cacheKeyPre, clazz); // 将不在缓存的键值对批量放入缓存
|
|
|
for(Map.Entry<K, T> item : apply.entrySet()) {
|
|
|
lastResult.put(item.getKey(), item.getValue());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return lastResult;
|
|
|
} catch (Exception e) {
|
|
|
LOGGER.warn("getBulk from redis failed!!", e);
|
...
|
...
|
|