Caching synchronization And returned null values with @Cacheable
I would like to know if null value values returned from an annotated @Cacheable method are cached?
Is there a way to enable or disable it? Sometimes we do want to cache it!
Moreover, what happened if I have two parallel same calls (same parameters) to an annotated @Cacheable method?
Would it be executed twice? What if this method is resource consuming? We clearly want the second call to wait for the cached result of the first call.
In our implementation we have another boolean property on the @Cacheable method badly named "synchronize".
This enables us to say if we want the second call to wait for the result of the first one.
Map<String, List<String>> resourceOrTimeConsumingMethod(String key);
Do we have the same level of configuration in Spring 3.1 ?