提交 f6d9653f 编写于 作者: 如梦技术's avatar 如梦技术 🐛

mica-redis 添加 sCard 方法。

上级 51bccacc
......@@ -460,6 +460,16 @@ public class MicaRedisCache {
});
}
/**
* 返回集合中元素的数量。
* @param key redis key
* @return 数量
*/
@Nullable
public Long sCard(String key) {
return setOps.size(key);
}
/**
* 同时设置一个或多个 key-value 对。
* 如果某个给定 key 已经存在,那么 MSET 会用新值覆盖原来的旧值,如果这不是你所希望的效果,请考虑使用 MSETNX 命令:它只会在所有给定 key 都不存在的情况下进行设置操作。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册