mirror of
				https://github.com/dromara/RuoYi-Vue-Plus.git
				synced 2025-11-04 16:23:42 +08:00 
			
		
		
		
	add 增加 RedisUtils 获取缓存Map的key列表
This commit is contained in:
		@@ -3,6 +3,7 @@ package com.ruoyi.common.utils.redis;
 | 
			
		||||
import com.ruoyi.common.utils.spring.SpringUtils;
 | 
			
		||||
import lombok.AccessLevel;
 | 
			
		||||
import lombok.NoArgsConstructor;
 | 
			
		||||
import org.apache.poi.ss.formula.functions.T;
 | 
			
		||||
import org.redisson.api.*;
 | 
			
		||||
import org.redisson.config.Config;
 | 
			
		||||
 | 
			
		||||
@@ -327,6 +328,17 @@ public class RedisUtils {
 | 
			
		||||
        return rMap.getAll(rMap.keySet());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 获得缓存Map的key列表
 | 
			
		||||
     *
 | 
			
		||||
     * @param key 缓存的键值
 | 
			
		||||
     * @return key列表
 | 
			
		||||
     */
 | 
			
		||||
    public static Set<String> getCacheMapKeySet(final String key) {
 | 
			
		||||
        RMap<String, T> rMap = CLIENT.getMap(key);
 | 
			
		||||
        return rMap.keySet();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 往Hash中存入数据
 | 
			
		||||
     *
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user