I'm using @Cacheable
annotation to store in cache some methods
<cache:annotation-driven />
<bean id="cacheManager" class="org.springframework.cache.support.SimpleCacheManager">
<property name="caches">
<set>
<bean class="org.springframework.cache.concurrent.ConcurrentMapCacheFactoryBean" p:name="method1" />
<bean class="org.springframework.cache.concurrent.ConcurrentMapCacheFactoryBean" p:name="method2" />
</set>
</property>
</bean>
But Once several users use the application 's cache is full thereby blocking the application. Is there any way to limit the size of cache and if yes do this may affect the application's data?