Package org.openiam.config
Class OpeniamCacheConfiguration
- java.lang.Object
-
- org.springframework.cache.annotation.AbstractCachingConfiguration
-
- org.springframework.cache.annotation.ProxyCachingConfiguration
-
- org.openiam.config.OpeniamCacheConfiguration
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.context.annotation.ImportAware
@Configuration public class OpeniamCacheConfiguration extends org.springframework.cache.annotation.ProxyCachingConfiguration
- Author:
- Lev Bornovalov
Overrides Spring's defualt cache configuration, allowing us to provide a custom cache interceptor.
Required for IDMAPPS-3644
-
-
Constructor Summary
Constructors Constructor Description OpeniamCacheConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.cache.interceptor.BeanFactoryCacheOperationSourceAdvisor
cacheAdvisor(org.springframework.cache.interceptor.CacheOperationSource cacheOperationSource, org.springframework.cache.interceptor.CacheInterceptor cacheInterceptor)
CacheBeanPostProcessor
cacheBeanPostProcessor()
org.springframework.cache.interceptor.CacheInterceptor
cacheInterceptor(org.springframework.cache.interceptor.CacheOperationSource cacheOperationSource)
This is a direct copy/paste from the superclass.org.springframework.cache.CacheManager
cacheManager()
org.springframework.cache.interceptor.CacheOperationSource
cacheOperationSource()
org.springframework.cache.interceptor.KeyGenerator
keyGenerator()
void
setImportMetadata(org.springframework.core.type.AnnotationMetadata importMetadata)
-
-
-
Method Detail
-
setImportMetadata
public void setImportMetadata(org.springframework.core.type.AnnotationMetadata importMetadata)
- Specified by:
setImportMetadata
in interfaceorg.springframework.context.annotation.ImportAware
- Overrides:
setImportMetadata
in classorg.springframework.cache.annotation.AbstractCachingConfiguration
-
cacheAdvisor
@Bean(name="org.springframework.cache.config.internalCacheAdvisor") @Role(2) public org.springframework.cache.interceptor.BeanFactoryCacheOperationSourceAdvisor cacheAdvisor(org.springframework.cache.interceptor.CacheOperationSource cacheOperationSource, org.springframework.cache.interceptor.CacheInterceptor cacheInterceptor)
- Overrides:
cacheAdvisor
in classorg.springframework.cache.annotation.ProxyCachingConfiguration
-
cacheOperationSource
@Bean @Role(2) public org.springframework.cache.interceptor.CacheOperationSource cacheOperationSource()
- Overrides:
cacheOperationSource
in classorg.springframework.cache.annotation.ProxyCachingConfiguration
-
cacheInterceptor
@Bean @Role(2) public org.springframework.cache.interceptor.CacheInterceptor cacheInterceptor(org.springframework.cache.interceptor.CacheOperationSource cacheOperationSource)
This is a direct copy/paste from the superclass.However, it allows us to instantiate a custom implementation of CacheInterceptor, which we need in order to do get access to the generated @Cacheable and @Cachevict keys
- Overrides:
cacheInterceptor
in classorg.springframework.cache.annotation.ProxyCachingConfiguration
-
cacheBeanPostProcessor
@Bean public CacheBeanPostProcessor cacheBeanPostProcessor()
-
cacheManager
@Bean public org.springframework.cache.CacheManager cacheManager() throws IOException
- Throws:
IOException
-
keyGenerator
@Bean public org.springframework.cache.interceptor.KeyGenerator keyGenerator()
-
-