Cache evict on one of multiple keys
<p>In my application I have multiple cacheable methods with multiple keys:</p>

<pre><code>@Cacheable(cacheNames = "valueCodes", key = "{#value, #fieldId, #projectId}")
@Cacheable(cacheNames = "fieldNames", key = "{#field, #value, #projectId}")
@Cacheable(cacheNames = "qi", key = "{#langCode, #question, #projectId}")
@Cacheable(cacheNames = "fieldCodes", key = "{#name, #projectId}")
</code></pre>

<p>Now I want a cachevict method which cleares all the caches where <strong><em>only</em></strong> the #projectId key, which is a UUID, matches:</p>

<pre><code>@CacheEvict(value = {"valueCodes", "fieldCodes", "qi"; "fieldCodes"}, key = "#projectId")
</code></pre>

<p>I've read in <a href="https://jira.spring.io/browse/SPR-10958" rel="noreferrer">this</a> article that this is not possible and that </p>

<blockquote>
  <p>Only the evict annotation's key regex matching more than one element
  in each of the cacheNames</p>
</blockquote>

<p>I'm not really sure what they mean by that, but I guess it has something to do with using regex in <a href="http://docs.spring.io/spring/docs/current/spring-framework-reference/html/expressions.html" rel="noreferrer">SpEL</a>.</p>

<p>So I started thinking about concatinating my keys into one key:</p>

<pre><code>@Cacheable(cacheNames="cahceName", key="concat(#projectId).concat(#otherKey)")
</code></pre>

<p>and using regex to match all keys with the projectId followed by a wildcard. But I couldn't really find a way to do this.</p>

<p>Is what I'm trying to accomplish possible? If so, how do I do this?</p>