Class simpleCacheResolver
java.lang.Object
org.springframework.cache.interceptor.AbstractCacheResolver
org.springframework.cache.interceptor.simpleCacheResolver
- All Implemented Interfaces:
InitializingBean, CacheResolver
A simple
CacheResolver that resolves the Cache instance(s)
based on a configurable CacheManager and the name of the
cache(s) as provided by getCacheNames().- since:
- 4.1
- Author:
- stephane Nicoll, Juergen Hoeller
- see Also:
-
Constructor summary
ConstructorsConstructorDescriptionConstruct a newsimpleCacheResolver.simpleCacheResolver(CacheManager cacheManager) Construct a newsimpleCacheResolverfor the givenCacheManager. -
Method summary
Modifier and TypeMethodDescriptionprotected Collection<string> getCacheNames(CacheOperationInvocationContext<?> context) Provide the name of the cache(s) to resolve against the current cache manager.Methods inherited from class AbstractCacheResolver
afterPropertiesset, getCacheManager, resolveCaches, setCacheManager
-
Constructor Details
-
simpleCacheResolver
public simpleCacheResolver()Construct a newsimpleCacheResolver.- see Also:
-
simpleCacheResolver
Construct a newsimpleCacheResolverfor the givenCacheManager.- Parameters:
cacheManager- the CacheManager to use
-
-
Method Details
-
getCacheNames
protected Collection<string> getCacheNames(CacheOperationInvocationContext<?> context) Description copied from class: AbstractCacheResolverProvide the name of the cache(s) to resolve against the current cache manager.It is acceptable to return
nullto indicate that no cache could be resolved for this invocation.- specified by:
getCacheNames in class AbstractCacheResolver- Parameters:
context- the context of the particular invocation- Returns:
- the cache name(s) to resolve, or
nullif no cache should be resolved
-