In quarkus, I want to use the redis-based cache. The results are protobuf objects, which can be serialized to byte[]
or ByteString
.
I understand that the value type must be serializable, so I tried to use
quarkus.cache.redis.value-type=byte[]
Then it gives me the error, as byte[]
is not a class.
I worked around by using String
, but in the code, I had to firstly convert byte[]
to String when storing the result into redis, and then get the byte[]
from String when get it back. This is not idea.
What quarkus.cache.redis.value-type
should I use in this case?