Sep 8th, 2011, 12:46 AM
Time Interval/Refresh Cache in spring 3.1
By marking the method with the @Cacheable annotation, we tell the container that the findBook method is backed by the cache entry books. That is each time the method is called, a cache lookup is performed using as key the method parameters (in this case the isbn argument). If a value is found, it will be returned and the method execution skipped. However, if the key is not found, the method is executed as usual and its result stored in the cache so the next time the method is invoked, the result can be returned without actually executing the (expensive or slow) method.
Please any one can advice me How to set the time interval in cache Option? Hope have some option to set/refresh the cache ...
Sep 8th, 2011, 01:45 AM
There isn't because it depends on the underlying caching mechanism used. You can set the cache times for EhCache (for instance) in the ehcache configuration.