// StringRedisConnection stringRedisConnection = (StringRedisConnection) connection;
for (String uidStr : uidStrs) {
connection.hGetAll(stringRedisSerializer.serialize(uidStr));
}
Java对Redis的批量操作 - RedisTemplate一、背景 需求:一次性获取redis缓存中多个key的value 潜在隐患:循环key,获取value,可能会造成连接池的连接数增多,连接的创建和摧毁,消耗性能 解决方法:根...