public static synchronized void destroyCache(String name) {
        Cache cache = caches.remove(name);
        if (cache != null) {
            if (localOnly.contains(name)) {
                localOnly.remove(name);
                localCacheFactoryStrategy.destroyCache(cache);
            } else {
                cacheFactoryStrategy.destroyCache(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