// StringRedisConnection stringRedisConnection = (StringRedisConnection) connection;
for (String uidStr : uidStrs) {
connection.hGetAll(stringRedisSerializer.serialize(uidStr));
}
Java對Redis的批量操作 - RedisTemplate一、背景 需求:一次性獲取redis緩存中多個(gè)key的value 潛在隱患:循環(huán)key酸钦,獲取value掖举,可能會造成連接池的連接數(shù)增多婉支,連接的創(chuàng)建和摧毀,消耗性能 解決方法:根...