疯狂的狮子Li
2024-01-08 46e46e60a6ed856e151d544bc487444ff41de194
update 规范设计模式命名
已重命名1个文件
已修改1个文件
10 ■■■■ 文件已修改
ruoyi-common/ruoyi-common-redis/src/main/java/org/dromara/common/redis/manager/CaffeineCacheDecorator.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/ruoyi-common-redis/src/main/java/org/dromara/common/redis/manager/PlusSpringCacheManager.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/ruoyi-common-redis/src/main/java/org/dromara/common/redis/manager/CaffeineCacheDecorator.java
ÎļþÃû´Ó ruoyi-common/ruoyi-common-redis/src/main/java/org/dromara/common/redis/manager/PlusCacheWrapper.java ÐÞ¸Ä
@@ -7,18 +7,18 @@
import java.util.concurrent.Callable;
/**
 * Cache è£…饰器(用于扩展一级缓存)
 * Cache è£…饰器模式(用于扩展 Caffeine ä¸€çº§ç¼“å­˜)
 *
 * @author LionLi
 */
public class PlusCacheWrapper implements Cache {
public class CaffeineCacheDecorator implements Cache {
    private static final com.github.benmanes.caffeine.cache.Cache<Object, Object>
        CAFFEINE = SpringUtils.getBean("caffeine");
    private final Cache cache;
    public PlusCacheWrapper(Cache cache) {
    public CaffeineCacheDecorator(Cache cache) {
        this.cache = cache;
    }
ruoyi-common/ruoyi-common-redis/src/main/java/org/dromara/common/redis/manager/PlusSpringCacheManager.java
@@ -156,7 +156,7 @@
    private Cache createMap(String name, CacheConfig config) {
        RMap<Object, Object> map = RedisUtils.getClient().getMap(name);
        Cache cache = new PlusCacheWrapper(new RedissonCache(map, allowNullValues));
        Cache cache = new CaffeineCacheDecorator(new RedissonCache(map, allowNullValues));
        if (transactionAware) {
            cache = new TransactionAwareCacheDecorator(cache);
        }
@@ -170,7 +170,7 @@
    private Cache createMapCache(String name, CacheConfig config) {
        RMapCache<Object, Object> map = RedisUtils.getClient().getMapCache(name);
        Cache cache = new PlusCacheWrapper(new RedissonCache(map, config, allowNullValues));
        Cache cache = new CaffeineCacheDecorator(new RedissonCache(map, config, allowNullValues));
        if (transactionAware) {
            cache = new TransactionAwareCacheDecorator(cache);
        }