redis-cache icon indicating copy to clipboard operation
redis-cache copied to clipboard

Investigate weird serialization logic

Open tillkruss opened this issue 5 years ago • 3 comments

My best guess is that this is never called. Thoughts @naxvog?

In 3.0 we should re-think the serialization.

tillkruss avatar Sep 11 '20 21:09 tillkruss

Just to summarize our slack conversation:

  • The original change was made years ago
  • The last condition of maybe_serialize serializes an already serialized string (nonsense)
  • All non strings should be serialized

We agreed on taking no further action at the moment in 2.x but will refactor the method in a future 3.0 release in order to maintain compatibility.

naxvog avatar Sep 11 '20 22:09 naxvog

@naxvog Thoughts on the latest push?

tillkruss avatar Sep 28 '20 21:09 tillkruss

Alright:

  • We're now flush the cache right after upgrading to 2.0.16, to flush weird double serialized data
  • All data going into the object cache is serialized (strings, booleans, etc.)
  • All data going out of the cache is unserialized once

@naxvog: I haven't tested any of this, but I'm happy with the overall approch

tillkruss avatar Sep 29 '20 18:09 tillkruss