public static Cache[] getAllCaches() {
        List<Cache> values = new ArrayList<>();
        for (Cache cache : caches.values()) {
            values.add(cache);
        }
        return values.toArray(new Cache[values.size()]);
    }
Returns an array of all caches in the system.
@return an array of all caches in the system.
xmppserver/src/main/java/org/jivesoftware/util/cache/CacheFactory.java