The cache key should use the value of the object

Fix so that when serializing with Marshal the value of the object is
used instead of the object. Otherwise the cache_key will always be
unique.
The same can be achieved with the `Digest::SHA1` class. I'll merge this in and change it back directly on master.