Commit e3ccb0c0 by 袁伟铭

1.0.0

parent 3b1b72fd
...@@ -283,19 +283,19 @@ public class RedisUtils { ...@@ -283,19 +283,19 @@ public class RedisUtils {
if (keys != null && keys.length > 0) { if (keys != null && keys.length > 0) {
if (keys.length == 1) { if (keys.length == 1) {
boolean result = redisTemplate.delete(keys[0]); boolean result = redisTemplate.delete(keys[0]);
log.info("--------------------------------------------"); log.debug("--------------------------------------------");
log.info("删除缓存:{},结果:{}", keys[0], result); log.debug("删除缓存:{},结果:{}", keys[0], result);
log.info("--------------------------------------------"); log.debug("--------------------------------------------");
} else { } else {
Set<String> keySet = new HashSet<>(); Set<String> keySet = new HashSet<>();
for (String key : keys) { for (String key : keys) {
keySet.addAll(redisTemplate.keys(key)); keySet.addAll(redisTemplate.keys(key));
} }
long count = redisTemplate.delete(keySet); long count = redisTemplate.delete(keySet);
log.info("--------------------------------------------"); log.debug("--------------------------------------------");
log.info("成功删除缓存:{}", keySet.toString()); log.debug("成功删除缓存:{}", keySet.toString());
log.info("缓存删除数量:{}个", count); log.debug("缓存删除数量:{}个", count);
log.info("--------------------------------------------"); log.debug("--------------------------------------------");
} }
} }
} }
...@@ -806,9 +806,9 @@ public class RedisUtils { ...@@ -806,9 +806,9 @@ public class RedisUtils {
} }
long count = redisTemplate.delete(keys); long count = redisTemplate.delete(keys);
// 此处提示可自行删除 // 此处提示可自行删除
log.info("--------------------------------------------"); log.debug("--------------------------------------------");
log.info("成功删除缓存:{}", keys.toString()); log.debug("成功删除缓存:{}", keys.toString());
log.info("缓存删除数量:{}个", count); log.debug("缓存删除数量:{}个", count);
log.info("--------------------------------------------"); log.debug("--------------------------------------------");
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment