Top Description Methods
org.springframework.cache.jcache.config

public Interface JCacheConfigurer

extends CachingConfigurer
Known Direct Implementers
org.springframework.cache.jcache.config.JCacheConfigurerSupport
Imports
org.springframework.cache.annotation.CachingConfigurer, org.springframework.cache.interceptor.CacheResolver, org.springframework.lang.Nullable

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.

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

Author
Stephane Nicoll
Since
4.1
See Also
CachingConfigurer, org.springframework.cache.annotation.EnableCaching

Method Summary

Modifier and TypeMethod and Description
public default CacheResolver
exceptionCacheResolver()

Return the CacheResolver bean to use to resolve exception caches for annotation-driven cache management.

Inherited from org.springframework.cache.annotation.CachingConfigurer:
cacheManagercacheResolvererrorHandlerkeyGenerator

Method Detail

exceptionCacheResolverback to summary
public default CacheResolver exceptionCacheResolver()

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

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