Caching Java Objects on Redis

1,140 views
Skip to first unread message

ibrahim....@gmail.com

unread,
Dec 21, 2020, 12:29:37 PM12/21/20
to Quarkus Development mailing list
Dears,
Is there a way to cache Java objects into Redis ? I was using embedded Infinispan and it was working fine, but now I need to switch Redis due to some requirement.

Regards.

Leonel Gayard

unread,
Feb 2, 2021, 10:03:25 AM2/2/21
to Quarkus Development mailing list
Yes!

In my personal experience, we have chosen to serialize the Java objects as JSON and store that in Redis. And then, to read the value from Redis and deserialize a Java object from it.

In theory, it would be very possible to store the object itself, using Java serialization. But we avoid this approach as we have other applications in other languages (Python, Go) also reading from this cache. 
Reply all
Reply to author
Forward
0 new messages