It would be great if someone could suggest me on what would be the best way to store a list of java objects in Redis.
Currently, I'm converting the java objects into json strings and storing those strings in Redis and I have a set in Redis to keep track of all these.
For eg :-
SET student:1 '{"name":"testOne","stream":computer science}'
SET student:2 '{"name":"testTwo","stream":electronics}'
SADD students 1
SADD students 2
So when ever I want to fetch the list of students, I first get the set students
and then iterate over it and get the json strings at those keys.
Just wondering if there is any other better way to handle the scenario of storing a list of java objects to Redis.
(I'm using redis as a cache)