spring-framework / org.springframework.cache.jcache.config / JCacheConfigurer

JCacheConfigurer

interface JCacheConfigurer : CachingConfigurer

Extension of CachingConfigurer for the JSR-107 implementation.

To be implemented by classes annotated with org.springframework.cache.annotation.EnableCaching that wish or need to specify explicitly how exception caches are resolved for annotation-driven cache management. Consider extending JCacheConfigurerSupport, which provides a stub implementation of all interface methods.

See org.springframework.cache.annotation.EnableCaching for general examples and context; see #exceptionCacheResolver() for detailed instructions.

Author
Stephane Nicoll

Since
4.1

See Also
CachingConfigurerJCacheConfigurerSupportorg.springframework.cache.annotation.EnableCaching

Functions

exceptionCacheResolver

abstract fun exceptionCacheResolver(): CacheResolver

Return the CacheResolver bean to use to resolve exception caches for annotation-driven cache management. Implementations must explicitly declare org.springframework.context.annotation.Bean, e.g.

 @Configuration @EnableCaching public class AppConfig extends JCacheConfigurerSupport { @Bean // important! @Override public CacheResolver exceptionCacheResolver() { // configure and return CacheResolver instance } // ... } 
See org.springframework.cache.annotation.EnableCaching for more complete examples.

Inheritors

JCacheConfigurerSupport

open class JCacheConfigurerSupport : CachingConfigurerSupport, JCacheConfigurer

An extension of CachingConfigurerSupport that also implements JCacheConfigurer.

Users of JSR-107 annotations may extend from this class rather than implementing from JCacheConfigurer directly.