public void unregisterCaches(String pluginName) {
        List<CacheInfo> caches = pluginCaches.remove(pluginName);
        if (caches != null) {
            for (CacheInfo info : caches) {
                extraCacheMappings.remove(info.getCacheName());
                // Check if other cluster nodes have this plugin installed
                Collection<Boolean> answers =
                        CacheFactory.doSynchronousClusterTask(new IsPluginInstalledTask(pluginName), false);
                for (Boolean installed : answers) {
                    if (installed) {
                        return;
                    }
                }
                // Destroy cache if we are the last node hosting this plugin
                try {
                    CacheFactory.destroyCache(info.getCacheName());
                }
                catch (Exception e) {
                    Log.warn(e.getMessage(), e);
                }
            }
        }
    }
Unregisters all caches for the given plugin.

@param pluginName the name of the plugin whose caches will be unregistered.
xmppserver/src/main/java/org/jivesoftware/openfire/container/PluginCacheRegistry.java