public static synchronized void dereferenceSerializingCache(String name) {
        Cache cache = caches.get(name);
        if (cache != null) {
            if (cache instanceof CacheWrapper<?,?> && ((CacheWrapper) cache).getWrappedCache() instanceof SerializingCache<?,?>) {
                ((SerializingCache)((CacheWrapper) cache).getWrappedCache()).deregisterClasses();
            }
        }
    }
Removes the class definitions from a SerializingCache, if a cache exists with the provided name (and that cache
is a SerializingCache).

This method should be invoked when a plugin that provided the class definitions gets unloaded. If this method is
not invoked, the Plugin Class Loader will retain references (and thus not be garbage collected). This will cause
ClassCastExceptions when a new/reloaded version of the plugin starts interacting with the cache.

A cache for which this method is used does not get destroyed (all data is retained per the cache configuration).
However, the cache cannot be interacted with (as data in the cache cannot be serialized/deserialized). To restore
functionality, {@link #createSerializingCache(String, Class, Class)} is to be used. This will re-register class
definitions for existing caches (or create a new cache, if one doesn't exist).

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