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.BeanFactoryCacheOperationSourceAdvisorcacheAdvisor(org.springframework.cache.interceptor.CacheOperationSource cacheOperationSource, org.springframework.cache.interceptor.CacheInterceptor cacheInterceptor)CacheBeanPostProcessorcacheBeanPostProcessor()org.springframework.cache.interceptor.CacheInterceptorcacheInterceptor(org.springframework.cache.interceptor.CacheOperationSource cacheOperationSource)This is a direct copy/paste from the superclass.org.springframework.cache.CacheManagercacheManager()org.springframework.cache.interceptor.CacheOperationSourcecacheOperationSource()org.springframework.cache.interceptor.KeyGeneratorkeyGenerator()voidsetImportMetadata(org.springframework.core.type.AnnotationMetadata importMetadata)
-
-
-
Method Detail
-
setImportMetadata
public void setImportMetadata(org.springframework.core.type.AnnotationMetadata importMetadata)
- Specified by:
setImportMetadatain interfaceorg.springframework.context.annotation.ImportAware- Overrides:
setImportMetadatain 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:
cacheAdvisorin classorg.springframework.cache.annotation.ProxyCachingConfiguration
-
cacheOperationSource
@Bean @Role(2) public org.springframework.cache.interceptor.CacheOperationSource cacheOperationSource()
- Overrides:
cacheOperationSourcein 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:
cacheInterceptorin 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()
-
-