add 增加 RedisUtils 批量删除 hash key 方法

2.X
疯狂的狮子li 2 years ago
parent acd662f680
commit 1872ca95b5

@ -374,6 +374,21 @@ public class RedisUtils {
return rMap.remove(hKey);
}
/**
* Hash
*
* @param key Redis
* @param hKeys Hash
*/
public static <T> void delMultiCacheMapValue(final String key, final Set<String> hKeys) {
RBatch batch = CLIENT.createBatch();
RMapAsync<String, T> rMap = batch.getMap(key);
for (String hKey : hKeys) {
rMap.removeAsync(hKey);
}
batch.execute();
}
/**
* Hash
*

Loading…
Cancel
Save