The current implementation of org.jivesoftware.util.cache.Cache imposes no particular constraints on the keys and values placed within it.
However, whilst the implementation org.jivesoftware.util.cache.DefaultCache will happily take null or non-serializable keys, the constraints of Hazelcast mean that org.jivesoftware.openfire.plugin.util.cache.ClusteredCache must take serializable, non-null keys.
This can lead to bugs - for example OF-1480, the original implementation of
To avoid this, DefaultCache should enforce non-null, serializable keys and values.