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 unit tests are failing with `value.to_s`. Without it all tests pass, even the tests that you added. I think we don't need this change.