Why would I use a redis sorted set
of articles sorted by unix timestamp over a redis list
and pushing elements onto it. They seem to offer the same end results. One thing I notice is with a redis sorted set
you can do intersections with other sets and zsets
Depends on your usage afterward.
Sorting a ZSET by the insertion order, and using a list can look similar, but there are many differences. Here are a few:
In general, look at the API that each datatype provides, and choose the one that gives you the best results for what you need (other than being sorted by insertion time).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With