|
@@ -1,6 +1,5 @@
|
|
package com.css.simulation.resource.scheduler.infrastructure.persistence.redis;
|
|
package com.css.simulation.resource.scheduler.infrastructure.persistence.redis;
|
|
|
|
|
|
-import api.common.util.CollectionUtil;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
|
|
|
|
@@ -28,11 +27,4 @@ public class RedisUtil {
|
|
return stringRedisTemplate.keys(prefix + "*");
|
|
return stringRedisTemplate.keys(prefix + "*");
|
|
}
|
|
}
|
|
|
|
|
|
- public static void flushdb(StringRedisTemplate stringRedisTemplate) {
|
|
|
|
- Set<String> keys = stringRedisTemplate.keys("*");
|
|
|
|
- if (CollectionUtil.isNotEmpty(keys)) {
|
|
|
|
- stringRedisTemplate.delete(keys);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
}
|
|
}
|