Class SimpleExceptionCacheResolver
- java.lang.Object
- org.springframework.cache.interceptor.AbstractCacheResolver
- org.springframework.cache.jcache.interceptor.SimpleExceptionCacheResolver
- All Implemented Interfaces:
InitializingBean
,CacheResolver
public class SimpleExceptionCacheResolver extends AbstractCacheResolver
A simpleCacheResolver
that resolves the exception cache based on a configurableCacheManager
and the name of the cache:CacheResultOperation.getExceptionCacheName()
.- Since:
- 4.1
- Author:
- Stephane Nicoll
- See Also:
CacheResultOperation.getExceptionCacheName()
Constructor Summary
Constructors Constructor Description SimpleExceptionCacheResolver(CacheManager cacheManager)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Collection<String>
getCacheNames(CacheOperationInvocationContext<?> context)
Provide the name of the cache(s) to resolve against the current cache manager.Methods inherited from class org.springframework.cache.interceptor.AbstractCacheResolver
afterPropertiesSet, getCacheManager, resolveCaches, setCacheManager
Constructor Detail
SimpleExceptionCacheResolver
public SimpleExceptionCacheResolver(CacheManager cacheManager)
Method Detail
getCacheNames
protected Collection<String> getCacheNames(CacheOperationInvocationContext<?> context)
Description copied from class:AbstractCacheResolver
Provide the name of the cache(s) to resolve against the current cache manager.It is acceptable to return
null
to indicate that no cache could be resolved for this invocation.- Specified by:
getCacheNames
in classAbstractCacheResolver
- Parameters:
context
- the context of the particular invocation- Returns:
- the cache name(s) to resolve, or
null
if no cache should be resolved