Class CacheProperties
- java.lang.Object
- org.springframework.boot.autoconfigure.cache.CacheProperties
@ConfigurationProperties(prefix="spring.cache") public class CacheProperties extends Object
Configuration properties for the cache abstraction.- Since:
- 1.3.0
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CacheProperties.Caffeine
Caffeine specific cache properties.static class
CacheProperties.Couchbase
Couchbase specific cache properties.static class
CacheProperties.EhCache
EhCache specific cache properties.static class
CacheProperties.Infinispan
Infinispan specific cache properties.static class
CacheProperties.JCache
JCache (JSR-107) specific cache properties.static class
CacheProperties.Redis
Redis-specific cache properties.
Constructor Summary
Constructors Constructor Description CacheProperties()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getCacheNames()
CacheProperties.Caffeine
getCaffeine()
CacheProperties.Couchbase
getCouchbase()
CacheProperties.EhCache
getEhcache()
CacheProperties.Infinispan
getInfinispan()
CacheProperties.JCache
getJcache()
CacheProperties.Redis
getRedis()
CacheType
getType()
org.springframework.core.io.Resource
resolveConfigLocation(org.springframework.core.io.Resource config)
Resolve the config location if set.void
setCacheNames(List<String> cacheNames)
void
setType(CacheType mode)
Constructor Detail
CacheProperties
public CacheProperties()
Method Detail
getCacheNames
public List<String> getCacheNames()
setCacheNames
public void setCacheNames(List<String> cacheNames)
getCaffeine
public CacheProperties.Caffeine getCaffeine()
getCouchbase
public CacheProperties.Couchbase getCouchbase()
getEhcache
public CacheProperties.EhCache getEhcache()
getInfinispan
public CacheProperties.Infinispan getInfinispan()
getJcache
public CacheProperties.JCache getJcache()
getRedis
public CacheProperties.Redis getRedis()
resolveConfigLocation
public org.springframework.core.io.Resource resolveConfigLocation(org.springframework.core.io.Resource config)
Resolve the config location if set.- Parameters:
config
- the config resource- Returns:
- the location or
null
if it is not set - Throws:
IllegalArgumentException
- if the config attribute is set to an unknown location