// interceptor could use a specific cache manager.
for (EmbeddedCacheManager cm : jcacheManagers.keySet()) {
Set<String> cacheNames = cm.getCacheNames();
for (String name : cacheNames) {
if (name.equals(cacheName)) {
JCacheManager jcacheManager = jcacheManagers.get(cm);
Cache<K, V> cache = jcacheManager.getCache(cacheName);
if (cache != null)
return cache;
return jcacheManager.getOrCreateCache(
cacheName, cm.<K, V>getCache(cacheName).getAdvancedCache());
}
}
}