diff --git a/ruoyi-admin/src/main/resources/ehcache.xml b/ruoyi-admin/src/main/resources/ehcache.xml
new file mode 100755
index 00000000..5add5e62
--- /dev/null
+++ b/ruoyi-admin/src/main/resources/ehcache.xml
@@ -0,0 +1,142 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/CacheUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/CacheUtils.java
new file mode 100755
index 00000000..6fd985ce
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/CacheUtils.java
@@ -0,0 +1,200 @@
+package com.ruoyi.common.utils;
+
+import com.ruoyi.common.utils.spring.SpringUtils;
+import org.springframework.cache.Cache;
+import org.springframework.cache.CacheManager;
+import org.springframework.cache.ehcache.EhCacheCache;
+import org.springframework.cache.transaction.TransactionAwareCacheDecorator;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.lang.Nullable;
+import org.springframework.util.ObjectUtils;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.concurrent.TimeUnit;
+
+public class CacheUtils
+{
+ /**
+ * 使用redis时对redis进行单独特殊操作需要使用
+ *
+ * @param
+ * @param
+ * @return
+ */
+ public static RedisTemplate getRedisTemplate()
+ {
+ return SpringUtils.getBean("redisTemplate");
+ }
+
+ /**
+ * 获取CacheManager
+ *
+ * @return
+ */
+ public static CacheManager getCacheManager()
+ {
+ return SpringUtils.getBean(CacheManager.class);
+ }
+
+ /**
+ * 根据cacheName从CacheManager中获取cache
+ *
+ * @param cacheName
+ * @return
+ */
+ public static Cache getCache(String cacheName)
+ {
+ return getCacheManager().getCache(cacheName);
+ }
+
+ /**
+ * 获取缓存的所有key值(由于springcache不支持获取所有key,只能根据cache类型来单独获取)
+ *
+ * @param cacheName
+ * @return
+ */
+ @SuppressWarnings(value = { "unchecked" })
+ public static Set getkeys(String cacheName)
+ {
+ Cache cache = getCacheManager().getCache(cacheName);
+ Set keyset = new HashSet<>();
+ if (cache instanceof EhCacheCache)
+ {
+ EhCacheCache ehcache = (EhCacheCache) cache;
+ keyset = new HashSet<>(ehcache.getNativeCache().getKeys());
+ }
+ else if (cache instanceof TransactionAwareCacheDecorator)
+ {
+ Set