@SuppressWarnings("unchecked")
    private static <T extends Cache> T wrapCache(T cache, String name) {
        if ("Routing Components Cache".equals(name)) {
            cache = (T) new ComponentCacheWrapper(cache);
        } else {
            cache = (T) new CacheWrapper(cache);
        }
        cache.setName(name);

        caches.put(name, cache);
        return cache;
    }
Destroys the cache for the cache name specified.

@param name the name of the cache to destroy.
xmppserver/src/main/java/org/jivesoftware/util/cache/CacheFactory.java