Skip to content

Commit

Permalink
update 优化 删除掉有问题的方法(使用RedisUtils)
Browse files Browse the repository at this point in the history
  • Loading branch information
JavaLionLi committed Sep 18, 2024
1 parent 28dff18 commit fb0d67d
Showing 1 changed file with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,16 @@
import java.util.Set;

/**
* 缓存操作工具类 {@link }
* 缓存操作工具类
*
* @author Michelle.Chung
* @date 2022/8/13
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
@SuppressWarnings(value = {"unchecked"})
public class CacheUtils {

private static final CacheManager CACHE_MANAGER = SpringUtils.getBean(CacheManager.class);

/**
* 获取缓存组内所有的KEY
*
* @param cacheNames 缓存组名称
*/
public static Set<Object> keys(String cacheNames) {
RMap<Object, Object> rmap = (RMap<Object, Object>) CACHE_MANAGER.getCache(cacheNames).getNativeCache();
return rmap.keySet();
}

/**
* 获取缓存值
*
Expand Down

0 comments on commit fb0d67d

Please sign in to comment.