add 增加 RedisUtils 检查缓存对象是否存在方法

This commit is contained in:
konbai 2022-12-20 00:03:01 +08:00
parent 8448bcdc6d
commit 43b31edb75

View File

@ -209,6 +209,15 @@ public class RedisUtils {
batch.execute(); batch.execute();
} }
/**
* 检查缓存对象是否存在
*
* @param key 缓存的键值
*/
public static boolean isExistsObject(final String key) {
return CLIENT.getBucket(key).isExists();
}
/** /**
* 缓存List数据 * 缓存List数据
* *