Make it easier to cache plugin class instances

Description

adds a warning against caching plugin class instances directly to the cache (because of problems - https://github.com/igniterealtime/openfire-monitoring-plugin/issues/155)

Add an overload or other additional method to the cache implementation (or somewhere else sensible) that allows plugin developers to pass/retrieve an instance to/from the cache that gets invisibly serialised/deserialised, preventing any reference to the Class being added to the cache.

e.g. store it as XML / JSON / byte array / crayon drawing / other types available to Openfire Core ClassLoader

Environment

None

Assignee

Guus der Kinderen

Reporter

Dan Caseley