use a sortedset to store a user's events :
zrangebyscore Fred -inf +inf withscores
1) "SEQNO20180607001" [event's unique id]
2) "1514736000000" [event's time, a unix timestamp]
3) "SEQNO20180607002"
4) "1514736000230"
5) "SEQNO20180607003"
6) "15147360002235"
and a simple key-value pair to store the event's details:
get SEQNO20180607001
"{\"name\":\"Fred\",\"age\":25,\"action\":\"click main page\"}"
like this question, the event detail, its value length isn't predictable, so I think 'hash' is not a good choice and I'm thinking about the sortedset's memory usage.Is there a good way to minimize the sortedset's memory usage? Thanks.