You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @georgeboot yes, String is used for its universal properties across cache providers, across languages. However, as you mention, it is entirely possible that serde_json::Value may be something that can replace it.
We used a String to get to the same simplicity such as when Redis used Strings.
Im curious, what are your thoughts? do you want to use serde_json::Value? if so what are the pros/cons?
I think string-only was a good frist step, but there are plenty use cases to support other types as well. For example, in our auth pipeline, we want to store a simpel boolean flag (outcome of a complex auth process). Now I have to manually encode en decode the boolean to and from some string format (serde_json in our case).
serde_json has the benefit that it's widely known and human readable. Downsides are that it's not the most efficient out there. We should also consider something like MessagePack.
The question is, do we expect our users to interact with redis directly and do we expect them to be able to parse it contents? If yes, lets go serde_json. If no, let's go MessagePack (via rmp-serde)
Currently, the cache values are always strings. However, it should be relatively easy to store anything that can be serialized.
I am willing to contribute this change, but am announcing my intention so that I can collect additional suggestions.
The text was updated successfully, but these errors were encountered: