Interface JCacheConfigurer
- All Superinterfaces:
CachingConfigurer
- All Known Implementing Classes:
JCacheConfigurerSupport
public interface JCacheConfigurer extends CachingConfigurer
Extension ofCachingConfigurer
for the JSR-107 implementation.To be implemented by classes annotated with
EnableCaching
that wish or need to specify explicitly how exception caches are resolved for annotation-driven cache management. Consider extendingJCacheConfigurerSupport
, which provides a stub implementation of all interface methods.See
EnableCaching
for general examples and context; seeexceptionCacheResolver()
for detailed instructions.- Since:
- 4.1
- Author:
- Stephane Nicoll
- See Also:
CachingConfigurer
,JCacheConfigurerSupport
,EnableCaching
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CacheResolver
exceptionCacheResolver()
Return theCacheResolver
bean to use to resolve exception caches for annotation-driven cache management.Methods inherited from interface org.springframework.cache.annotation.CachingConfigurer
cacheManager, cacheResolver, errorHandler, keyGenerator
Method Detail
exceptionCacheResolver
@Nullable CacheResolver exceptionCacheResolver()
Return theCacheResolver
bean to use to resolve exception caches for annotation-driven cache management. Implementations must explicitly declare@Bean
, e.g.@Configuration @EnableCaching public class AppConfig extends JCacheConfigurerSupport { @Bean // important! @Override public CacheResolver exceptionCacheResolver() { // configure and return CacheResolver instance } // ... }
SeeEnableCaching
for more complete examples.