String[] cacheTypes = {ModelKeys.LOCAL_CACHE, ModelKeys.INVALIDATION_CACHE, ModelKeys.REPLICATED_CACHE, ModelKeys.DISTRIBUTED_CACHE} ;
for (String cacheType : cacheTypes) {
// get the caches of a type
ModelNode caches = model.get(cacheType) ;
if (caches.isDefined() && caches.getType() == ModelType.OBJECT) {
List<Property> cacheList = caches.asPropertyList() ;
// add a clone of each cache to the list
for (Property cache : cacheList) {
String cacheName = cache.getName() ;
ModelNode cacheValue = cache.getValue().clone();
remainingCaches.add(new Property(cacheName, cacheValue));