Hi,

I was thinking that it might be useful to cache the marshalled version of
an object with the object itself.  If you were writing some code that
had to marshal objects repeatedly and had a chance of remarshalling the
same thing twice, this could save some time.  I admit, this might just be
a symptom of bad coding, but I've run into it recently.  For example,
if you had an array with two or more references to the same large
object and you wanted to marshal the array, this could be useful.  This
feature could be togglable: Marshal.enable_caching and
Marshal.disable_caching.

Does this seem useful to anyone?

Emil