com.pig4cloud.plugin.cache.properties.CacheConfigProperties 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.properties;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import java.util.HashSet;
import java.util.Set;
/**
* @author fuwei.deng
* @version 1.0.0
*
* 全局配置
*/
@Data
@ConfigurationProperties(prefix = "spring.cache.multi")
public class CacheConfigProperties {
private Set cacheNames = new HashSet<>();
/**
* 是否存储空值,默认true,防止缓存穿透
*/
private boolean cacheNullValues = true;
/**
* 是否动态根据cacheName创建Cache的实现,默认true
*/
private boolean dynamic = true;
/**
* 缓存key的前缀
*/
private String cachePrefix;
private RedisConfigProp redis = new RedisConfigProp();
private CaffeineConfigProp caffeine = new CaffeineConfigProp();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy