intelligenthack / intelligentcache

A distributed cache backed by Redis
MIT License
18 stars 2 forks source link

Fix protobuf deserialization issue #30

Closed ocoster-is closed 3 years ago

ocoster-is commented 3 years ago

The RedisCache implementation was incorrectly calling ToString() on the RedisValue before passing it on to the serializer for deserialization.

This worked fine for strings (which is the main type that the library has been used with), but failed with protobuf when GZip compression was used, as the result of the call to ToString() changed that value too much.

This PR removed those calls, adding a test for protobuf serialization/deserializtion.