Skip to content

Commit c8192ba

Browse files
committed
feat: 添加 keys 方法
1 parent 1a5c66a commit c8192ba

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

  • common/plugin/cache/src/main/java/top/cadecode/uniboot/common/plugin/cache/util

common/plugin/cache/src/main/java/top/cadecode/uniboot/common/plugin/cache/util/RedisUtil.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import org.springframework.stereotype.Component;
88

99
import java.util.Objects;
10+
import java.util.Set;
1011
import java.util.concurrent.TimeUnit;
1112

1213
/**
@@ -120,6 +121,13 @@ public static Boolean expire(String key, long timeout, TimeUnit timeUnit) {
120121
return TEMPLATE.expire(key, timeout, timeUnit);
121122
}
122123

124+
/**
125+
* keys
126+
*/
127+
public static Set<String> keys(String key) {
128+
return TEMPLATE.keys(key);
129+
}
130+
123131
@Override
124132
public void afterPropertiesSet() {
125133
TEMPLATE = redisTemplate;

0 commit comments

Comments
 (0)