Class CachingConfigurerSupport
java.lang.Object
org.springframework.cache.annotation.CachingConfigurerSupport
- All Implemented Interfaces:
CachingConfigurer
- Direct Known Subclasses:
JCacheConfigurerSupport
Deprecated.
An implementation of
CachingConfigurer
with empty methods allowing
subclasses to override only the methods they're interested in.- Since:
- 4.1
- Author:
- Stephane Nicoll
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Return the cache manager bean to use for annotation-driven cache management.Deprecated.Return theCacheResolver
bean to use to resolve regular caches for annotation-driven cache management.Deprecated.Return theCacheErrorHandler
to use to handle cache-related errors.Deprecated.Return the key generator bean to use for annotation-driven cache management.
-
Constructor Details
-
CachingConfigurerSupport
public CachingConfigurerSupport()Deprecated.
-
-
Method Details
-
cacheManager
Deprecated.Description copied from interface:CachingConfigurer
Return the cache manager bean to use for annotation-driven cache management. A defaultCacheResolver
will be initialized behind the scenes with this cache manager. For more fine-grained management of the cache resolution, consider setting theCacheResolver
directly.Implementations must explicitly declare
@Bean
, e.g.@Configuration @EnableCaching public class AppConfig implements CachingConfigurer { @Bean // important! @Override public CacheManager cacheManager() { // configure and return CacheManager instance } // ... }
See @EnableCaching
for more complete examples.- Specified by:
cacheManager
in interfaceCachingConfigurer
-
cacheResolver
Deprecated.Description copied from interface:CachingConfigurer
Return theCacheResolver
bean to use to resolve regular caches for annotation-driven cache management. This is an alternative and more powerful option of specifying theCacheManager
to use.If both a
CachingConfigurer.cacheManager()
and#cacheResolver()
are set, the cache manager is ignored.Implementations must explicitly declare
@Bean
, e.g.@Configuration @EnableCaching public class AppConfig implements CachingConfigurer { @Bean // important! @Override public CacheResolver cacheResolver() { // configure and return CacheResolver instance } // ... }
SeeEnableCaching
for more complete examples.- Specified by:
cacheResolver
in interfaceCachingConfigurer
-
keyGenerator
Deprecated.Description copied from interface:CachingConfigurer
Return the key generator bean to use for annotation-driven cache management. Implementations must explicitly declare@Bean
, e.g.@Configuration @EnableCaching public class AppConfig implements CachingConfigurer { @Bean // important! @Override public KeyGenerator keyGenerator() { // configure and return KeyGenerator instance } // ... }
See @EnableCaching
for more complete examples.- Specified by:
keyGenerator
in interfaceCachingConfigurer
-
errorHandler
Deprecated.Description copied from interface:CachingConfigurer
Return theCacheErrorHandler
to use to handle cache-related errors.By default,
SimpleCacheErrorHandler
is used and simply throws the exception back at the client.Implementations must explicitly declare
@Bean
, e.g.@Configuration @EnableCaching public class AppConfig implements CachingConfigurer { @Bean // important! @Override public CacheErrorHandler errorHandler() { // configure and return CacheErrorHandler instance } // ... }
See @EnableCaching
for more complete examples.- Specified by:
errorHandler
in interfaceCachingConfigurer
-
CachingConfigurer
directly