add 增加 RedisUtils 获取缓存Map的key列表

This commit is contained in:
疯狂的狮子li
2022-11-21 18:57:46 +08:00
parent 98a63bf3b2
commit 2f86b53ff5

View File

@@ -327,6 +327,17 @@ public class RedisUtils {
return rMap.getAll(rMap.keySet());
}
/**
* 获得缓存Map的key列表
*
* @param key 缓存的键值
* @return key列表
*/
public static <T> Set<String> getCacheMapKeySet(final String key) {
RMap<String, T> rMap = CLIENT.getMap(key);
return rMap.keySet();
}
/**
* 往Hash中存入数据
*