Code example for CachingConfigurerSupport

0
 
@Configuration 
@ComponentScan(basePackages = { "ch.rasc.caching.spring" }) 
@EnableCaching 
// (mode = AdviceMode.ASPECTJ) 
public class Config extends CachingConfigurerSupport { 
 
	@Bean 
	@Override 
	public CacheManager cacheManager() { 
		return new ConcurrentMapCacheManager("calculator", "anotherCache"); 
	} 
 
	@Override 
	public KeyGenerator keyGenerator() { 
		return new SimpleKeyGenerator(); 
	} 
 
}