Class CacheConfiguration
java.lang.Object
org.springframework.cache.annotation.CachingConfigurerSupport
es.kukenan.smartfi.microservice.transfer.cache.CacheConfiguration
- All Implemented Interfaces:
org.springframework.cache.annotation.CachingConfigurer
@Configuration
@EnableCaching
@RefreshScope
public class CacheConfiguration
extends org.springframework.cache.annotation.CachingConfigurerSupport
Class cache configuration.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.springframework.cache.CacheManagerCache manager.private com.hazelcast.core.HazelcastInstanceHazelcastInstance hazelcastInstance.private inttime-to-live established.private Stringcache name established.private Stringspring cache name established. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.cache.CacheManagerorg.springframework.cache.interceptor.CacheResolverorg.springframework.cache.CacheManagerSpring cache manager.org.springframework.cache.interceptor.CacheResolverSpring cache resolver.Methods inherited from class org.springframework.cache.annotation.CachingConfigurerSupport
errorHandler, keyGenerator
-
Field Details
-
timeToLive
@Value("${cache.time-to-live}") private int timeToLivetime-to-live established. -
transferCacheName
cache name established. -
transferSpringCacheName
spring cache name established. -
hazelcastInstance
@Autowired @Qualifier("hazelcastInstance") private com.hazelcast.core.HazelcastInstance hazelcastInstanceHazelcastInstance hazelcastInstance. -
cacheManager
private org.springframework.cache.CacheManager cacheManagerCache manager.
-
-
Constructor Details
-
CacheConfiguration
public CacheConfiguration()
-
-
Method Details
-
cacheManager
@Bean public org.springframework.cache.CacheManager cacheManager()- Specified by:
cacheManagerin interfaceorg.springframework.cache.annotation.CachingConfigurer- Overrides:
cacheManagerin classorg.springframework.cache.annotation.CachingConfigurerSupport
-
springCacheManager
@Bean public org.springframework.cache.CacheManager springCacheManager()Spring cache manager.- Returns:
- spring cache manager
-
cacheResolver
@Bean public org.springframework.cache.interceptor.CacheResolver cacheResolver()- Specified by:
cacheResolverin interfaceorg.springframework.cache.annotation.CachingConfigurer- Overrides:
cacheResolverin classorg.springframework.cache.annotation.CachingConfigurerSupport
-
springCacheResolver
@Bean public org.springframework.cache.interceptor.CacheResolver springCacheResolver()Spring cache resolver.- Returns:
- spring cache resolver
-