What order are cache layers when using spring @Caching?
<p>Using the <a href="http://docs.spring.io/spring/docs/current/spring-framework-reference/html/cache.html#cache-annotations-caching" rel="nofollow noreferrer">@Caching</a> annotation, spring allows adding multiple <a href="http://docs.spring.io/spring/docs/current/spring-framework-reference/html/cache.html#cache-annotations-cacheable" rel="nofollow noreferrer">@Cacheable</a> annotations to a single method. Since <a href="http://docs.spring.io/spring/docs/current/spring-framework-reference/html/cache.html#cache-annotations-cacheable-condition" rel="nofollow noreferrer">conditional caching</a> is possible using @Cacheable, in what order are the annotations and therefore the conditions evaluated - are values stored in multiple caches if more than one evaluates to true? Again during cache get are all conditions evaluated in parallel and value fetched from any cache whose condition evaluates to true?</p>

<p>for example consider :</p>

<pre><code>@Caching( cacheable = { @Cacheable(cacheNames="smallBooks", condition="#name.length &lt; 32"), @Cacheable(cacheNames="fiction", condition="#domain.equals('fiction')"), @Cacheable(cacheNames="everythingelse")})
public Book findBook(String name, String domain)
</code></pre>