org.springframework.cache.interceptor
Interface CacheDefinitionSource
- All Known Implementing Classes:
- AbstractFallbackCacheDefinitionSource, AnnotationCacheDefinitionSource, CompositeCacheDefinitionSource
public interface CacheDefinitionSource
Interface used by CacheInterceptor. Implementations know
how to source cache operation attributes, whether from configuration,
metadata attributes at source level, or anywhere else.
- Author:
- Costin Leau
getCacheDefinition
CacheDefinition getCacheDefinition(Method method,
Class<?> targetClass)
- Return the cache operation definition for this method.
Return null if the method is not cacheable.
- Parameters:
method - methodtargetClass - target class. May be null, in which
case the declaring class of the method must be used.
- Returns:
CacheDefinition the matching cache operation definition,
or null if none found