com.pig4cloud.plugin.cache.support.RedisCaffeineCacheManager Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of multilevel-cache-spring-boot-starter Show documentation
Show all versions of multilevel-cache-spring-boot-starter Show documentation
support L1 caffeine and L2 redis cache
package com.pig4cloud.plugin.cache.support;
import com.github.benmanes.caffeine.cache.Caffeine;
import com.pig4cloud.plugin.cache.properties.CacheConfigProperties;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager;
import org.springframework.data.redis.core.RedisTemplate;
import java.util.Collection;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.TimeUnit;
/**
* @author fuwei.deng
* @version 1.0.0
*/
@Slf4j
public class RedisCaffeineCacheManager implements CacheManager {
private ConcurrentMap cacheMap = new ConcurrentHashMap();
private CacheConfigProperties cacheConfigProperties;
private RedisTemplate
© 2015 - 2025 Weber Informatics LLC | Privacy Policy