Today I needed some performance improvements on a application that makes quite a few calls to a database. My default statement is not to implement performance improvements unless there is a issue. Well it just happened.
I did not wanted to change any of the existing code so what to do. In Spring 3.x the added a caching mechanism. Implementing this is simple:
@Configuration @EnableCaching public class SpringConfiguration { /** * Name of the available Cache */ public final static String CORE_CACHE = "default"; /** * Creates a in memory cache using a concurrent HasMap.