REDIS Bulk RPUSH set values to a list

redis

Is there an optimized way to RPUSH all the values of a set to a list without SPOP-ing them one by one (or SMEMBERS)? (I need to perform bulk RPUSH of huge set each T time to a list) ?

Thank you,

Best Answer

Actually there is but not where you'd intuitively think of looking for it. Have a look at SORT - this should do what you need:

SORT myset BY nosort STORE mylist