ruoyi-common/src/main/java/com/ruoyi/common/utils/DictUtils.java
@@ -41,8 +41,7 @@ Object cacheObj = SpringUtils.getBean(RedisCache.class).getCacheObject(getCacheKey(key)); if (StringUtils.isNotNull(cacheObj)) { List<SysDictData> DictDatas = StringUtils.cast(cacheObj); return DictDatas; return StringUtils.cast(cacheObj); } return null; } @@ -152,6 +151,16 @@ } /** * 删除指定字典缓存 * * @param key 字典键 */ public static void removeDictCache(String key) { SpringUtils.getBean(RedisCache.class).deleteObject(getCacheKey(key)); } /** * 清空字典缓存 */ public static void clearDictCache()