if (cacheName.equals(DEFAULT_CACHE_NAME))
throw new IllegalArgumentException("Cache name cannot be used as it is a reserved, internal name");
if (checkExisting) {
Configuration existing = configurationOverrides.get(cacheName);
if (existing != null) {
existing.applyOverrides(configOverride);
return existing.clone();
}
}
Configuration configuration = defaultConfigIfNotPresent.clone();
configuration.applyOverrides(configOverride.clone());