@Override public <K, V> Cache<K, V> getCache(LocalDistributableSessionManager manager) { ReplicationConfig config = manager.getReplicationConfig(); String containerName = config.getCacheName(); String templateCacheName = null; if ((containerName != null) && !containerName.isEmpty()) { String[] parts = containerName.split(DELIMITER); if (parts.length == 2) { containerName = parts[0]; templateCacheName = parts[1]; } } String cacheName = manager.getName(); EmbeddedCacheManager container = this.registry.getCacheContainer(containerName); this.applyOverrides(container.defineConfiguration(cacheName, templateCacheName, new Configuration()), config); return container.<K, V>getCache(cacheName); }