Spring Cache applies caching to Java methods, providing the application and environment where results of selective methods are temporarily stored. It is abstracted and is represented through the cache interface. Spring Cache improves the performance of the methods by avoiding multiple executions of the same method giving the same input and result. Note that this type of caching can be applied to the methods which return the same result giving the same input.
Spring Cache has several implementations and these are:
SimpleCacheManager with ConcurrentHashMap (ConcurrentMap-based): One of the supported cache managers of Spring MVC 4.x because of its high performance but must not be used in cache eviction:
<bean id="cacheManager" class="org.springframework.cache.support .SimpleCacheManager"> <property name="caches"> <set> <bean class="org.springframework.cache.concurrent...